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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 getdate() with timestamp?

Author  Topic 

matthisco
Starting Member

48 Posts

Posted - 2010-05-28 : 10:23:59
Hi Folks,

Can you get the date and time using a function?

I use getdate(), as the default value of a smalldatetime.

It only gives me the date, can I get the time aswell?

Thanks in advance

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2010-05-28 : 10:29:52
getdate() returns the time. My guess is that you're putting getdate() into a string variable?

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page
   

- Advertisement -