The easiest way is to set up a default value for that field in your database, so it gets automatically inserted when you create a new record.
SQL Server? MySQL? Something else? If sql server, you would put getDate() as the default value for that field. This will automatically insert the current datetime into that field whenever a new record is created. If you want to insert it yourself, you can set it into the db when you save the other fields. Something like <cfquery> insert into db (title, body, uploadDate) VALUES ('#title#','#body#',#createODBCDateTime(now())#) </cfquery> (of course ,you should use cfqueryparam for the title and body fields, but I am too lazy to type them). Jerry On 6/26/07, Steven Sprouse <[EMAIL PROTECTED]> wrote: > Does anyone know how I can insert a date and time stamp into a SQL database > when someone goes on our website and uploads something? > > I created a form where someone can input the title and body of a press > release but I also want it to automatically record the time that it is > uploaded, store it in the database and also output it on the list of press > releases. > > How do I do this??? > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Macromedia ColdFusion MX7 Upgrade to MX7 & experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:282315 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4