Even if CF supported dates without separators, you are setting numdate wrong anyway.

<CFSET numdate=03042002>

You really mean to set

<CFSET numdate="03042002">

it is the string you want, not a number representing 3 million and change.

Of course you really want something like

<CFSET numdate="03/04/2002">

Just a thought
Jerry Johnson



>>> [EMAIL PROTECTED] 03/27/02 06:27PM >>>
Looking at the docs, it says:
Returns a date/time object from a string. ParseDateTime converts date/time
strings that are in the U.S. date format. Use LSParseDateTime for
international date parsing. 

And also:
Year values 0 - 29 are interpreted as 21st century dates. Year values 30 -
99 are interpreted as 20th century dates. 

That seems to imply that (maybe?) it only handles 2-digit years... which
would be very odd, but I've seen dumber things...

Oh, okay - looking at the LSParseDateTime docs, it says (pardon the no-doubt
bad formatting):
-------------
When passing a date/time value for the English (US) locale, the date/time
string can be in any of the following forms:  date/time Composition Example 
dd mmmm yyyy
 "25 January 1999" 
 
hh:mm:ss
 "8:30:00" 
 
hh:mm:ss
 "20:30:00" 
 
mmmm dd, yyyy hh:mm:ss
 "January 25, 1999 8:30:00" 
 
hh:mm:ss mmm. dd, yyyy
 "8:30:00 Jan. 25, 1999" 
 
m/dd/yyyy hh:mm:ss
 "1/25/1999 8:30:00"  
----------

Looks like numbers without a separator aren't supported... :-(

Dirk
 

> -----Original Message-----
> From: Matt Robertson [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, March 27, 2002 3:16 PM
> To: CF-Talk
> Subject: re: date massaging
> 
> 
> Dave wrote,
> 
> > just wondering, is there a reason you wouldn't use 
> > parseDateTime() for this? it takes a string and converts 
> > it to a cf date.
> 
> If I try this:
> 
> <CFSET numdate=03042002>
> <CFSET thedate=ParseDateTime(numdate)>
> <CFOUTPUT>#thedate#</CFOUTPUT> 
> 
> I get this:
> 
> ''The date parameter of function ParseDateTime(date), which 
> is 03042002, does not represent a valid date''
> 
> Despite the fact that if I test the string against IsDate() 
> it verifies just fine.
> 
> --Matt--
> 
>  
>              
> 

______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to