Topic: DMD0034

Help File Version: 2.9.4.37

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 specified 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 to open the Default Element Selection Tool (the Element Picker or the Element Browser) or use the Down-Arrow key (Auto-Complete) on any parameter field to see a complete list of the memory locations that are valid for that parameter of the instruction.

 

Date / Time - specifies which Date / Time structure contains the date and time to convert. This can be any of the system-defined Date / Time structures, or any user-defined Date / Time structure.

 

1970 Epoch - specifies the numeric memory location to store the calculated 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. This format is for display purposes only, the value cannot be edited when displayed using this format.

 


See Also:

DT2EPOCH - Convert Date / Time to 1970 Epoch

 

EPOCH2DT - Convert 1970 Epoch Time to Date / Time

 

DTCMP - Compare Date / Time

 

DTDIFF - Difference between two Date / Times

 

DTOFFSET- Add Offset to Date / Time
 


Related Topics:

Date and Time Overview

 

Predefined Date / Time Structures

 

Date / Time Structure Fields

 

NETTIME - SNTP Client

 

SETTIME - Set PLC Date / Time

 


Rung Example: