May 24, 2005 at 8:28 am
I have a SQL Server Table (SQL Server 2000) which stores a date as an Integer Value. The Integer Values are like: 1099667378, 1099668505 and 1101155166. I was told that these values represent the Total Number of Seconds from a specified point in time (i.e., 1900 or 1970). Is there a SQL Date Function that would convert the Total Number of Seconds into a readable Date Format? Or do I need to create a formula that would: 1) Divide the Total Number of Seconds by 3600 to get the Total Number of Hours, 2) Then divide the Total Number of Hours by 24 to get the Total Number of Days, 3) Then use DateAdd to add the Total Number of Days to the Starting Point in Time, etc. Does anyone have a formula that would perform this conversion?
Thanks in advance for you assistance, Kevin
May 24, 2005 at 8:33 am
SELECT DATEADD(s, integer_value, '1970-01-01')
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply