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
 Transact-SQL (2000)
 How to update time of datetime field?

Author  Topic 

eric@horwitzlaw.com
Starting Member

6 Posts

Posted - 2005-06-22 : 11:39:44
Hi,

I need to update a time of a datetime field. How do i do this. I want to set it to be 00:00:000 or 12am from a date that has a time to it.


Thanks
eric

nosepicker
Constraint Violating Yak Guru

366 Posts

Posted - 2005-06-22 : 12:22:25
Several different ways to do this. Here's just one:

CONVERT(datetime, CONVERT(char(10), YourDatetimeField, 101))

Go to Top of Page
   

- Advertisement -