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 |
|
Frank2k
Starting Member
1 Post |
Posted - 2004-10-19 : 04:35:31
|
| Hello,I am busy with a sql database, we will store 10 seconds valueus in this database. there is only a problem, The date and the time had to be split so ill get a table with this rows :Stamp (int)Date (Date time)Time (Date Time)Wich command must i use to set the actual system date in the database and split the time and date?Ill hope you can help me .Greetings Frank |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-10-19 : 07:23:37
|
well i really don't know why would you want to split them...if u do you'll end up with two date time columns.you see datetime has both date and time values stored (hence datetime )so if u put only date you will have: 25.6.2004 00:00:00and if you put only time you'll have: 1.1.1900 13:23:55so there is really no point in spliting them. even your calculations will be simpler with one column.if you really must split them look up convet in BOL. probably the easiest way...select cast(convert(varchar(10), 104, getdate()) as datetime) datepart, cast(convert(varchar(10), 108, getdate()) as datetime) as timePartGo with the flow & have fun! Else fight the flow |
 |
|
|
|
|
|