Topic: DMD0034

DT2EPOCH - Convert Date/Time to 1970 Epoch


The Convert Date/Time to 1970 Epoch (DT2EPOCH) instruction calculates the number of seconds between the contents of the designated Date/Time structure and January 1, 1970. This value will fit in a DWord location and can be converted back to a Date/Time structure with the EPOCH2DT - Convert 1970 Epoch Time to Date/Time instruction.

 

Note: use the Copy Memory Range (MEMCOPY) instruction to copy from one Data/Time structure to another.

 

Parameters:

Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.

 

Date/Time - designates which Date/Time structure to convert. This can be any of the system-defined Date/Time structures, or any user-defined Date/Time structure.

 

Time - designates the location to store the converted value. This can be any writable numeric DWord location.

 


Status Display:

The status display shows the fully-qualified Date/Time value and the 1970 Epoch value.

 

There is also a Data View display format called 1970 Epoch that will display the 1970 Epoch value as a fully qualified Date/Time. Note: This format is for display purposes only, the value cannot be edited when displayed using this format.

 


See Also:

 


Related Topics:

 


Rung Example: