Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 actual date and time

Author  Topic 

landau66
Yak Posting Veteran

61 Posts

Posted - 2007-12-13 : 04:50:42
Hello everyone!

Whenever i insert a new row i would like to have the current date and time in the column DATE. How is that possible?

Thanks a lot and greetings from Vienna

Landau

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-13 : 04:52:15
See thos topic http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=94113



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

landau66
Yak Posting Veteran

61 Posts

Posted - 2007-12-13 : 05:21:34
Thanx a lot Peso!!!

landau
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-12-13 : 06:04:40
or you can specify it when using Insert statement

Insert into table(cols,datecol)
select 'value1',...getdate()

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -