thanks for the clarification. Thanks, Tony
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 3:10 PM To: CF-Talk Subject: RE: datetime formatting might be inserting the value yourself from a storedprocedure then. The default will only be used when the user hasn't specified a value. example: you are insert the datetime yourself DECLARE @mytime datetime, @title varchar(50) SET @mytime = getdate() SET @title = 'this is a test' INSERT INTO table1 (CreationDate, title) VALUES (@mytime, @title) SQL Server does it for you DECLARE @title varchar(50) SET @title = 'this is a test' INSERT INTO table1 (title) VALUES (@title) What you probably are doing is assigning the getdate() to a local variables. and then doing an insert using this variables. If this is what are you doing then you are correct. SQL Server will insert the exact time for all records in the insert. Anthony Petruzzi Webmaster 954-321-4703 [EMAIL PROTECTED] http://www.sheriff.org -----Original Message----- From: Tony Carcieri [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:50 PM To: CF-Talk Subject: RE: datetime formatting Tony, Doesn't getDate() consistently return the same date/time no matter how many recs are inserted? I found that in SQL. If I used getdate() and I inserted 10 records, each had the same date/time even though I submitted them at different intervals. Just need a clarification on this. Thanks, Tony -----Original Message----- From: Bosky, Dave [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:45 PM To: CF-Talk Subject: RE: datetime formatting I'm using mySQL with a datetime field. Thanks, Dave Bosky -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:39 PM To: CF-Talk Subject: RE: datetime formatting forget ASP! do it right from the database with a default on the column. in access use now() in the default field and in MSSQL, use getdate(). Anthony Petruzzi Webmaster 954-321-4703 [EMAIL PROTECTED] http://www.sheriff.org -----Original Message----- From: Bosky, Dave [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:33 PM To: CF-Talk Subject: datetime formatting I need to insert the current date and time into a table whenever a record is created. How would I format the current date and time in the following format using ASP? YYYY-MM-DD HH:MM:SS I'm not sure of the proper function in ASP to accomplish this task. Thanks, Dave ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

