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/

Reply via email to