LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Date to SQL Server DateTime Conversion

I have inherited a database of legacy data (created by Labview software) and I need to import that data into a SQL Server 2000 database.
One of the fields I'm importing includes a string of numbers which respresents a datetime field - in the following format:
3172089659
which represents the number of SECONDS since Jan 1 1904 12:00 am Universal Time
(Was that a significate date in history ?)
Is there a built in function within SQL that can help be convert this into a standard SQL Server DateTime format during import?

Thank you
Devon Kyle
0 Kudos
Message 1 of 2
(2,798 Views)
Devon,

This can be somewhat database dependent. I don't know how the standard SQL Server handles date addition. However,most have it. One which I uses has the following:
SECONDS( datetime-expr, integer-expr ) Add integer-expr seconds to the given date/time. If the integer-expr is negative, the appropriate number of seconds are subtracted from the date/time.

Since you know the start date, this would easily calculate the date you are wanting.

Hope this helps.

Russ
0 Kudos
Message 2 of 2
(2,798 Views)