"{ts '2005-04-02 18:51:25'}" and "2005-04-02 18:51:25" are not dates: they
are strings representing dates. The dates those two strings represent are
identical.
In the database, a date is being stored, not a string. Your database is
returning the date correctly, just not formatted the way you want it. So
simply apply the formatting:
createOdbcDateTime(myDate)
-----Original Message-----
From: Nick Baker [mailto:[EMAIL PROTECTED]
Sent: Monday, 4 April 2005 8:59 a.m.
To: CF-Talk
Subject: Datetime formatting problem.
CFMX 6.1
MS SQL 2000
Date times are being reformatted or loosing something when stored in db and
brought back out to variables, i.e.,
{ts '2005-04-02 18:51:25'}is being changed to 2005-04-02 18:51:25
But not all datetimes. Some show up as the original {ts '2005-04-02
18:51:25'}
I use server variables, and capture many of the variables in a SQL database
in case of a server failure. When the server comes back on, info is read
from the DB and restored to the variables.
Here is the format that I used to capture the times
<cfset Eventcurrenttime = #DateConvert("local2utc", Now())#>
DB format is "datetime"
Any hints?
Nick
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201310
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54