[thelist] CF Timestamp in a hidden input
Czechowski, Aaron
aczechowski at towson.edu
Wed Jul 19 15:33:26 CDT 2000
> I have been stumped... not the first time. I'd like to pass
> the current
> date and time in a hidden field to my db. Here's what I have:
Rudy gave me a GREAT tip the other day on exactly this, his original msg:
> -----Original Message-----
> From: rudy limeback [mailto:r937 at interlog.com]
> Sent: Tuesday, July 18, 2000 8:54 AM
> To: evolt thelist
> Subject: Re: [thelist] <cfpop> and date formating
>
>
> hi aaron
>
> re: inserting a date into a database -- why go to all the trouble of
> converting an external date into a format the database will
> accept, why not
> just ask the database to use its date
>
> instead of passing in the cf server's date
>
> insert into thetable values ( ... #Now()# ... )
>
> just use
>
> insert into thetable values ( ... current date ... )
>
> obviously, the reserved word "current date" will vary from database to
> database, so you gotta look it up
>
> in ms access, it's Date()
>
> also, you may be off by a few seconds in a timestamp if what you're
> capturing is a user event, but in one sense, using the
> database's timestamp
> is better, because the event didn't happen unless/until it's
> logged in the
> database
>
>
> rudy.limeback
> r937.com
> evolt.org
More information about the thelist
mailing list