May 12, 2006 #1 baden100 Programmer Joined Apr 26, 2006 Messages 10 Location US When I've got a DateTime field defined in a SQL Server table, how do I get the value to get auto populated if none is given in a query. ie. If I manually add a record to the table, I want the datetime field to autopopulate. Thanks
When I've got a DateTime field defined in a SQL Server table, how do I get the value to get auto populated if none is given in a query. ie. If I manually add a record to the table, I want the datetime field to autopopulate. Thanks
May 12, 2006 #2 DotNetGnat Programmer Joined Mar 10, 2005 Messages 5,548 Location IN use GetDate() function to insert the current date... -DNG Upvote 0 Downvote
May 12, 2006 #3 jbenson001 Programmer Joined Jan 7, 2004 Messages 8,172 Location US You can set a default on the date column to getdate() Jim Upvote 0 Downvote
May 12, 2006 Thread starter #4 baden100 Programmer Joined Apr 26, 2006 Messages 10 Location US Great. Thanks guys! Upvote 0 Downvote
May 12, 2006 #5 jbenson001 Programmer Joined Jan 7, 2004 Messages 8,172 Location US no problem.. good luck Upvote 0 Downvote