LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time in seconds from Jan 1st, 1970?

Hi,
I was wondering if there is any way to get the time in seconds from 1970 as opposed to the standard 1904?
Alex
0 Kudos
Message 1 of 4
(3,612 Views)
You can get the seconds from 1/1/1970, but you have to calculate it. Use the "Date/Time To Seconds" function. It takes a cluster for its input. Create a control from it to see what all the fields are for. Set the fields for the Month, Day, Year, Hour, etc. for the specific time on 1/1/1970 you want. Subtract the seconds output from the standard "Seconds since 1904" and you've got it.

Dan Press
www.primetest.com
0 Kudos
Message 2 of 4
(3,612 Views)
Hi Alex,

you can use this link http://www.calendarhome.com/date.shtml to calculate easier the number of seconds between YOUR DATE and 1904 and use the result as a constant (for substraction).
0 Kudos
Message 3 of 4
(3,612 Views)
You can determine that from LabVIEW itself.

You can get the time in seconds from Jan 1st, 1904 to Jan 1st, 1970 by using "Date/Time to Seconds", locate in the Time & Dialog functions menu. The result is an unsigned long number.

As you know, to get the time in seconds from 1904 until now, use "Get Date/Time in Seconds". The output is a double number, so you may want to convert that result into an unsigned long.

The time in seconds from 1970 until now is:

(1970 to now) = (1904 to now) - (1904 to 1970)

Best regards;
Enrique
www.vartortech.com
0 Kudos
Message 4 of 4
(3,612 Views)