Tony,
which line does that error occur on ?
the error doesn't really make sense with the code supplied as the only line
where you are doing anything with payment_date is
cfset payment_date=urldecode(form.payment_date)
and this is not doing anything date/time related.
Are you sure this error is
I saw the same thing Russ saw in your code. The variable payment_date
and paymentdate are named similarly, but are not the same. The error
appears to be thrown on payment_date, which doesn't appear to interact
with createodbcdatetime() in your example code at all.
-Cameron
On Wed, Apr 11, 2012
Are you using CFFORM?
I never use it, but I kind of remember there is something special witf input
fields containing _date.
~|
Order the Adobe Coldfusion Anthology now!
Tony,
which line does that error occur on ?
the error doesn't really make sense with the code supplied as the only line
where you are doing anything with payment_date is
cfset payment_date=urldecode(form.payment_date)
and this is not doing anything date/time related.
Are you sure this error is
Are you using CFFORM?
I never use it, but I kind of remember there is something special witf
input fields containing _date.
The data is actually being posted back from paypal. Paypal posts to my page
with all the transaction vars and i parse them. The script was created by a
much more
The data is actually being posted back from paypal.
Ok, I see. Well the problem is that CF is not able to parse the date in the
format supplied by Paypal.
Personally, I use createODBCDateTime(Now()) to register the date time. It will
be the time related to your sever instead of Paypal's one,
turn on FULL debug output in your cfadmin and it should give you more
detail as well as exact line number for the error, in fact a try/catch will
do this also.
no create a page with a form that posts the exact same data as paypal, and
you can use this to debug rather than waiting for paypal.
turn on FULL debug output in your cfadmin and it should give you more
detail as well as exact line number for the error, in fact a try/catch will
do this also.
no create a page with a form that posts the exact same data as paypal, and
you can use this to debug rather than waiting for paypal.
The data is actually being posted back from paypal.
Ok, I see. Well the problem is that CF is not able to parse the date
in the format supplied by Paypal.
Personally, I use createODBCDateTime(Now()) to register the date time.
It will be the time related to your sever instead of Paypal's
What is the actual content of the form.payment_date coming from PayPal?
It should be something like '08:38:49 Apr 11, 2012 PDT'. The code below
works just fine on that value on CF9 in my testing environment. Without the
' PDT' part, the code tries to run createodbcdatetime() on '08:38:49 Apr
11,
What is the actual content of the form.payment_date coming from PayPal?
It should be something like '08:38:49 Apr 11, 2012 PDT'. The code below
works just fine on that value on CF9 in my testing environment. Without the
' PDT' part, the code tries to run createodbcdatetime() on '08:38:49 Apr
11,
What I was saying is, I tested the actual code you originally posted on CF9
with 08:38:49 Apr 11, 2012 PDT as the input and it works fine. I was trying
to verify that the data you're working with has the timezone on the end,
since the cut portion of the code is designed to remove that, and will
Thank you for your help. I just added this code into a simple cf page:
cfset paymentdate = #createodbcdatetime('08:38:49 April 11, 2012 EST')#
and i get an error just loading the page:
Parameter validation error for the CREATEODBCDATETIME function.
The value of parameter 1, which is currently
That needs to be:
cfset paymentdate = #createodbcdatetime('08:38:49 April 11, 2012')#
The time zone on the end is invalid in CF.
On Wed, Apr 11, 2012 at 2:46 PM, Tony Paolillo tpaoli...@gmail.com wrote:
cfset paymentdate = #createodbcdatetime('08:38:49 April 11, 2012 EST')#
Out of curiosity if the date/time you want to put in is the system date/time
then why even pass it in via CF over using the databases built in functions
for date/time?
On 10/16/07, Robert Rawlins - Think Blue
[EMAIL PROTECTED] wrote:
Hello Guys,
I've never been in the habit of using
On 10/16/07, Robert Rawlins - Think Blue
[EMAIL PROTECTED]
DateCreated = cfqueryparam value=#now()# cfsqltype=cf_sql_timestamp /
This has always worked nicely and I've never really had any reason to
believe that it wouldn't, however, like I say, after reading about the
createODBCDateTime()
That's a good question Aaron, I hadn't thought to use the build in functions
from SQL to do that for me, I like the idea.
Rob
-Original Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED]
Sent: 16 October 2007 12:55
To: CF-Talk
Subject: Re: CreateODBCDateTime
Out of curiosity
createodbcdatetime()
Are you calling createodbcdatetime() directly on strings like 06 April
2005 08:16:51 o'clock BST?
If yes, this is wront, createodbcdatetime() expects a date as paremeter,
not a string;
If you supply a string representing a date, CF will try to convert it
first to a date,
the example i gave is exactly what cfdirectory returns on cf 6.1 - ie a
datetime object formatted as 06 April 2005 etc and it does work as i would
expect. cf7.1 cfdirectory returns datelastmodified differently to how 6.1 does
therefore breaking createodbcdatetime()
john.
createodbcdatetime()
the example i gave is exactly what cfdirectory returns on cf 6.1 - ie
a datetime object formatted as 06 April 2005
Exact, but a datetime object formatted is not a datetime object anymore:
it is a string.
Look at the docs for createodbcdatetime(), it takes a datetime object,
not a string.
If
When do I need to use CreateODBCDateTime() to insert a date
to a sql-server-database?
What happens with my code when I move to another database
which uses instead of an ODBC-Connection an OLE-DB or
JDBC-Connection? Do I have to change all my insert-queries?
ODBCdateTime doesn't work on
21 matches
Mail list logo