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 |
|
Vack
Aged Yak Warrior
530 Posts |
Posted - 2009-03-04 : 12:08:55
|
| I want to update a field with getdate() but I do not want the time in the field even though the field is datetime. Is this possible?update tableset date = getdate()I want date to be 3/4/2009 and not 3/4/2009 00:00:00 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-04 : 12:37:27
|
quote: Originally posted by Vack I want to update a field with getdate() but I do not want the time in the field even though the field is datetime. Is this possible?update tableset date = getdate()I want date to be 3/4/2009 and not 3/4/2009 00:00:00
you cant remove the time part altogether as sql server always stores time part along with date. However, the required formatting can be done at you front end application using date formatting functions to get date value alone |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|