Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting sysdate and time into the coloumn whose datatype is datetime 2

Status
Not open for further replies.

daka94

Programmer
Apr 27, 2001
33
US
Dear friend,
i want to insert system date and time into the coloumn whose datatype is datetime.
please help me
thank you in advance
daka
 
Reading between the pixels, you can also make the column have a default value of (getdate()), so that the record is automagically timestamped when you insert it (unless, of course, you explicitly provide a value). Robert Bradley
teaser.jpg

 
When you design a table, you can specify the Default Value for a datetime/smalldatetime column as getdate()

getdate() function will return a system date.

This way you don't have to specify that column in your insert query.

Hope this helps.

Mukund. (j.mukund@zensar.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top