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 |
|
zeeshan13
Constraint Violating Yak Guru
347 Posts |
Posted - 2009-06-04 : 11:42:33
|
| Hi All,I have a tabel called PromoIt has the following two fields.StartDateRevertDateBoth arer date fields but are in yyyy/mm/dd format. In my select how to convert them into datetime datatype with a yyyy-mm-dd format.Please suggest.Thanks,Zee |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-06-04 : 11:44:13
|
[code]select StartDate = convert(datetime, StartDate, 121), RevertDate = convert(datetime, RevertDate, 121)from Promo[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
zeeshan13
Constraint Violating Yak Guru
347 Posts |
Posted - 2009-06-04 : 12:07:18
|
| Khtan - It worked. Thanks... :) |
 |
|
|
|
|
|