thanx Robin
it's just so frustrating that you get such wildly different behaviour
with CF date functions.
ie:
if the 10.00 has grief with IsDate() but LSIsDate() recognises it
correctly you'd have to ask where the "LS" comes into it
and if LSDateFormat() really does have grief with "{ts '2004-05-25
00:00:00'}" because there's only 2 milisecond digits (as Steve
suggested) why then does DateFormat() work?
I *never* had this much grief with MS date functions with ASP
it's the inconsistant behaviour that's giving me the pip with CF date
functions. It smacks of a rushed job made by "Monday" and "Friday" teams
(if you know what I mean)
I only hope Blackstone has it sorted. 'till then, thanx again for the
regex
cheers
barry.b
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robin
Hilliard
Sent: Thursday, 13 January 2005 11:01 AM
To: CFAussie Mailing List
Subject: [cfaussie] Re: decimals confused as dates
Barry Beattie wrote:
> hi all
>
> first attempt: decimal values of "10.00" (ten dollars without the "$")
> gets formatted as "09/01/1900". all other decimals display fine. dates
> display fine (raw date format is "{ts '2004-05-25 00:00:00'}", etc).
>
> <cfif IsDate(result[i][tempKey])>
> #DateFormat(result[i][tempKey],"dd/mm/yyyy")#
> <cfelse>
> #result[i][tempKey]#
> </cfif>
Hey Barry,
From the manual isDate() returns true "if string can be converted to a
date/time value" - numbers CAN be converted to date time values -
remember that one representation of a date/time is the number of days
since the start of 1900.
If you only want to convert strings that look like {ts...} try
<cfif reFind("\{ts[^}]+\}", result[i][tempKey])>
Robin
http://www.rocketboots.com.au
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/