thanx for you interest guys.

it's CF6.1 with the LS setting to dd/mm/yyyy (this is for other web applications on 
the machines). We've had ridiculous grief with LSDateFormat and (partially because of 
the informix db driver) have to create the date from strings (eg: "{ts '" & theDate & 
"}")

I have looked at LsParsedateTime but the docs only mention locales, the ISO format 
(yyyy-mm-dd) isn't supported (it seems - have to try it tomorrow). I take your point 
of date object Vs string. this *may* help (here's hoping)

the funny thing is that it's not the mask that's the error, only the way the date is 
written. Dateformat with ISO dates is OK. eg:

LSDateformat("1996/03/04","yyyy/mm/dd") [error: "1996/03/04" invalid date format ]
LSDateformat("04/03/1996","yyyy/mm/dd") [is ok]
Dateformat("1996/03/04","yyyy/mm/dd") [is ok]

this seems related - I'm not the only one with this grief, it seems...
http://www.mail-archive.com/[EMAIL PROTECTED]/msg131877.html
"Re: URGENT, cfmx interprets MYSQL date (yyyy-mm-dd hh:mm:ss) as INVALID!"

thanx
barry.b




----- Original Message -----
From: "Kola Oyedeji" <[EMAIL PROTECTED]>
Date: Wed, 7 Jul 2004 12:27:38 +0100
To: <[EMAIL PROTECTED]>
Subject: RE: [ cf-dev ] LS date woes - any ideas?

> Barry
> 
> Couple of questions, firstly have you set the locale appropriately e.g.
> 
> Tried  setLocale("English (UK)") with the date in dd/mm/yyyy form?
> Also what version of cf are you using?
> 
> Finally most problems I have come across with dates involve using date
> functions against string representations of dates as opposed to *actual
> date time objects* created using createDate, LsParsedateTime etc. Try
> converting it into a valid date time object using one of the date
> related functions. If you are on cfmx you can wrap the function call in
> cfcsript in try/catch (incase the user enters "kentucky fried chicken
> instead of a date"). Beware the unpredictable/unreliable isDate()
> function.
> 
> HTH
> 
> KOla
>  is
> 
> 
> >> -----Original Message-----
> >> From: Barry L Beattie [mailto:[EMAIL PROTECTED]
> >> Sent: 07 July 2004 12:12
> >> To: [EMAIL PROTECTED]
> >> Subject: [ cf-dev ] LS date woes - any ideas?
> >> 
> >> Hi all
> >> 
> >> I've been bitten with CF's rejection of the ISO date format with
> LSDateFormat
> >> and general grief with non-US dates (esp with dd/mm/yyyy). The idea
> is simply
> >> to pass a date from a form to a cfqueryparam in ISO format without
> grief. I'm
> >> not winning.
> >> 
> >>  "invalid date format" LSDateFormat("1996/01/03","yyyy/mm/dd")
> >> 
> >> Apart from tearing the date apart and re-assembling it or using "mmm"
> for
> >> months, is there anything else that consistantly works?
> >> 
> >> I never had this much grief with ASP (when I used the ISO format).
> >> 
> >> cheers
> >> barry.b
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> --
> >> _______________________________________________
> >> Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes
> free!
> >> http://www.net2phone.com/cgi-bin/link.cgi?143
> >> 
> >> 
> >> 
> >> 
> >> 
> >> --
> >> These lists are syncronised with the CFDeveloper forum at
> >> http://forum.cfdeveloper.co.uk/
> >> Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> >> 
> >> CFDeveloper Sponsors and contributors:-
> >> *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF
> provided by
> >> activepdf.com*
> >>       *Forums provided by fusetalk.com* :: *ProWorkFlow provided by
> >> proworkflow.com*
> >>            *Tutorials provided by helmguru.com* :: *Lists hosted by
> gradwell.com*
> >> 
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> -- 
> These lists are syncronised with the CFDeveloper forum at 
> http://forum.cfdeveloper.co.uk/
> Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>  
> CFDeveloper Sponsors and contributors:-
> *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
> activepdf.com*
>       *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
>            *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> 

-- 
_______________________________________________
Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes free! 
http://www.net2phone.com/cgi-bin/link.cgi?143 





-- 
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
 
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]

Reply via email to