-----Original Message-----
From: Patricia Lee [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 1:53 PM
To: CF-Talk
Subject: Re: Problem with CreateODBCDateTime(Now())
You probably want
dateformat(now(), "mm/dd/yyyy")
createodbcdatetime creates, well, an odbc date/time... which is exactly
what you're seeing in the database. Usually used during db inserts casue
it's the format that most discerning databases like best.
Of course, you could always insert the odbcdatetime() value and
dateformat() it on display. Choose your poison.
-patti
> I'm trying to set the date when a user logs in, but it keeps showing up
in
> the database as:
> <cfoutput>{ts '2004-09-20 13:21:00'}</cfoutput>
>
> on my action page I have
> <cfset datetime="<cfoutput>#CreateODBCDateTime(Now())#</cfoutput>">
>
> <cfquery datasource="dsn">
> UPDATE trackusers
> SET Logindate='#datetime#', IP='#remote_addr#',
> browser='#http_user_agent#', remote_host='#remote_host#',
> remote_referer='#http_referer#'
> WHERE username = '#username#'
> AND pwd = '#pwd#'
> </cfquery>
>
> What am I doing wrong?
>
> Thanks
> Steve
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]