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, ', which fails.

On Wed, Apr 11, 2012 at 11:19 AM, Tony Paolillo <tpaoli...@gmail.com> wrote:

>
> Hi, im stuck on a problem that i just cannot seem to figure out.
> I have a script that recieves popsts from the paypal IPN.
> This is my code for decoding the date/time:
> <cfif isdefined("form.payment_date")>
>        <cfset payment_date=urldecode(form.payment_date)>
>        <cfset dl = len(payment_date)>
>        <cfset cut = dl - 3>
>        <cfset paymentdate_temp=removechars(payment_date,cut,4)>
>       <cfset paymentdate = #createodbcdatetime(paymentdate_temp)#>
> </cfif>
>
> The script works fine in CF7 and 8 but kicks an error in CF9. I use
> cfcatch to snag the error. The error is this:
>
> Error at decoding the payment_date, Expression, , 08:38:49 Apr 11, 2012 is
> an invalid date or time string.
>
> I cannot figure out what to do to save my live. Can someone please help?
>
> Thanks
> Tony
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350681
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to