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.
| Author |
Topic |
|
BigRetina
Posting Yak Master
144 Posts |
Posted - 2003-05-28 : 06:41:00
|
| Salute...How can i reset the time part in a date field?for example I have the following record in a table :EmployeeNo BirthDate---------- ----------520 15/6/1977 12:42:30I want to make it :520 15/6/1977 00:00:00How can I do that?? in one statment?? |
|
|
Andraax
Aged Yak Warrior
790 Posts |
Posted - 2003-05-28 : 06:46:38
|
| You can do: convert(datetime, convert(varchar, birthdate, 112))There's a better way too... Can't remember it at the mo :) |
 |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2003-05-28 : 07:06:44
|
update tableset birthdate = dateadd(dd,datediff(dd,0,birthdate),0) Jay White{0} |
 |
|
|
|
|
|