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 |
|
matkwan
Starting Member
36 Posts |
Posted - 2003-11-23 : 20:48:14
|
| Hi,How do I only insert Time to DateTime Column ?When I tried this, it gives me 1/1/1900.Insert into tblAbsence (EventTimeStamp) values ('12:00:00 AM')Matt |
|
|
byrmol
Shed Building SQL Farmer
1591 Posts |
Posted - 2003-11-23 : 20:52:15
|
| The DateTime data type has both the date and time portions. Simply disregard the date portion.DavidM"SQL-3 is an abomination.." |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-11-23 : 20:52:56
|
There is no way to insert only the time into a datetime column. Specifying only a time will default the date to 1/1/1900, it is normal behavior. If you wish to display on the time portion in a query, look in Books Online under the CONVERT function, it has some formatting codes that will display time portions only.Yeah, what David said. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|