One you don't need the CFOUTPUT's because you are in a CF tag.
<cfset datetime="#CreateODBCDateTime(Now())#">
Also, this is making a TimeStamp which some DB's will recognize, some take a
normal DateTime format. I'm not sure which DB you are using, but you could
also try:
<CFSET dtvalue="#DateFormat(now(), "yyyy-mm-dd")# #TimeFormat(now(),
"HH:mm:ss")#">
I used dtvalue because datetime could possible be a reserved word somewhere.
-----Original Message-----
From: Steve Kahn [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 1:42 PM
To: CF-Talk
Subject: Problem with CreateODBCDateTime(Now())
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]
- Problem with CreateODBCDateTime(Now()) Steve Kahn
- Re: Problem with CreateODBCDateTime(Now()) Patricia Lee
- RE: Problem with CreateODBCDateTime(Now()) Daniel Budde II
- Re: Problem with CreateODBCDateTime(Now()) Charlie Griefer
- Re: Problem with CreateODBCDateTime(Now()) Daniel Budde II
- Re: Problem with CreateODBCDateTime(Now()) Claude Schneegans
- Re: Problem with CreateODBCDateTime(Now()) Larry White
- Re: Problem with CreateODBCDateTime(Now()) Lawrence Ng
- Re: Problem with CreateODBCDateTime(Now()) Charlie Griefer
- Re: Problem with CreateODBCDateTime(Now()) Lawrence Ng
- Re: Problem with CreateODBCDateTime(Now()) Lawrence Ng