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
 How to insert present time in datetime column ?

Author  Topic 

samsun125
Yak Posting Veteran

63 Posts

Posted - 2009-09-21 : 02:58:17
Hi all,


i am using sqlserver2005,

in my table i have ordereddatetime column is there .

i am inserting today's date in the ordereddatetime column , but date is correct, time it was taking default time(12:00:00 AM ) (9/21/2009 12:00:00 AM)

but i want to insert today's date and present time, how to do

Regards
Rama

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2009-09-21 : 03:03:38
Is GETDATE() whet you're looking for? Make sure the data type is datetime...

- Lumbago
Go to Top of Page

samsun125
Yak Posting Veteran

63 Posts

Posted - 2009-09-21 : 03:19:30
Thankyou very much
Go to Top of Page
   

- Advertisement -