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 |
sven2
Yak Posting Veteran
57 Posts |
Posted - 2010-11-04 : 08:15:46
|
Hello,is it possible to store only a time in a table instead of datetime?Best regards,Sven |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-11-04 : 08:21:30
|
quote: Originally posted by sven2 Hello,is it possible to store only a time in a table instead of datetime?Best regards,Sven
Possible only if you use character datatypes such as char, varchar ,etc. But if you use datetime datatype, the datepart will be 1900-01-01MadhivananFailing to plan is Planning to fail |
|
|
sven2
Yak Posting Veteran
57 Posts |
Posted - 2010-11-04 : 08:32:55
|
Yes, that is true, but if I import the data into MS office Word i don't want to see the date.I tried everything in Word but I can't remove the date. So now I was thinking what if I can only store the time ... |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-11-04 : 08:39:24
|
When you import, just use convert functionselect convert(varchar(10),datetime_col,108) from your_tableMadhivananFailing to plan is Planning to fail |
|
|
sven2
Yak Posting Veteran
57 Posts |
Posted - 2010-11-04 : 08:47:53
|
Well, actually it is not an import, it is a merge ... |
|
|
|
|
|
|
|