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 2000 Forums
 SQL Server Development (2000)
 datetime data type

Author  Topic 

bobbabuoy
Starting Member

33 Posts

Posted - 2004-06-18 : 15:54:25
I am trying to write only the current time to a data field in a sql server db via asp and the Time() intrinsic function and it keeps adding '1/1/1900' to the time (ie: '1/1/1900 12:12:21 AM'). Why is that and how can I avoid it?

Thank you very much!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-06-18 : 15:58:15
You can't avoid it. Datetime includes both date and time. You will need to use CONVERT with the time style to get only the time portion out.

Tara
Go to Top of Page
   

- Advertisement -