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 |
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2011-07-11 : 05:02:01
|
| i have to columndate 20110711 time 501i want to get in this format 2011-07-11 00:05:01how can i do it? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-07-11 : 05:17:33
|
that is the data type of your column ? integer ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2011-07-11 : 05:46:28
|
| yes |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-07-11 : 06:12:38
|
[code]dateadd(second, [time] % 100, dateadd(minute, [time] / 100 % 100, dateadd(hour, [time] / 10000, convert(datetime, convert(varchar(10), [date]), 112))))[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|