Barry Beattie wrote:

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

RTHM - "LSIsDate() returns true if string can be converted to a date/time value IN THE CURRENT LOCALE" - ODBC datetime format is not a valid date in an Australian locale. IsDate recognises the universal ODBCDateTime format.


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?

It is inconsistent that LSDateFormat doesn't handle the ODBC date time format and DateFormat does. They're only supposed to differ in their output according to the docco. Anyway, in your case you don't need to use it.


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

You encounter similar problems in vbscript if you declare everything as a variant, which is essentially what happens in CF (everything being a string).


It might be informative to try this:

<cfoutput>
#"{ts '2004-05-25 00:00:00'}" + 0#
#LSDateFormat("{ts '2004-05-25 00:00:00'}" + 0)#
</cfoutput>

This is a standard CF date processing technique, makes a guest appearance on cfaussie from time to time. "+ 0" forces CF to convert the string to a numeric date value. All date functions work happily with these values.

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/

Reply via email to