December 9, 2005 at 11:38 am
One of my script log the events in a smalldatetime filed.
But some reason it is not writing seconds.All it writes 2005-12-08 20:12:00.000.
How do I capture seconds also.
December 9, 2005 at 11:46 am
try converting it to datetime..."select convert(datetime, fldSmallDateTime)"
**ASCII stupid question, get a stupid ANSI !!!**
December 9, 2005 at 11:58 am
Change the field to datetime. In smalldatetime you already lost the sec information.
DECLARE @myDate DATETIME
DECLARE @mySmallDate SMALLDATETIME
SELECT @myDate = GETDATE(), @mySmallDate = GETDATE()
SELECT GETDATE() myGETDATE,
@myDate myDate,
@mySmallDate mySmallDate,
CONVERT(DATETIME, @mySmallDate) LostSecondsInSmallDate
Regards,
gova
December 9, 2005 at 2:23 pm
SmallDateTime stores date/time value accurate to the minute
DateTime stores date time values accurate to 3 milliseconds.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply