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 |
|
groberts1980
Starting Member
1 Post |
Posted - 2008-11-19 : 13:34:51
|
| I have a time field in a database that is set up as SMALLINT. How can I convert that into DATETIME with a query? So basically when I am pulling it out of the query, I would like to do the conversion then.Any help is greatly appreciated. |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2008-11-19 : 13:51:26
|
| DECLARE @Foo SMALLINTSET @Foo = 1SELECT CAST(@Foo AS DATETIME) |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-11-20 : 01:54:09
|
quote: Originally posted by groberts1980 I have a time field in a database that is set up as SMALLINT. How can I convert that into DATETIME with a query? So basically when I am pulling it out of the query, I would like to do the conversion then.Any help is greatly appreciated.
What does the value refer to? days, minutes, seconds,etc?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|