Topic: DMD0036
DTDIFF - Difference between two Date / Times |
|
The Difference between two Date / Times (DTDIFF) instruction calculates the number of seconds of time between the contents of two Date / Time structures. The difference calculation is always performed as Date / Time A - Date / Time B.
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 A - specifies a Date / Time structure. This can be any of the system-defined Date / Time structures, or any user-defined Date / Time structure.
Date / Time B - specifies a Date / Time structure to subtract from Date / Time A. This can be any of the system-defined Date / Time structures, or any user-defined Date / Time structure.
Difference (DTA - DTB) in seconds- specifies a numeric memory location to store the difference in seconds between the two Date / Time structures. This can be any writable numeric DWord location.
|
|
Status Display:
The status display shows fully-qualified values for both Date Time structures and the number of seconds.
|
|
See Also:DT2EPOCH - Convert Date / Time to 1970 Epoch
EPOCH2DT - Convert 1970 Epoch Time to Date / Time
DTDIFF - Difference between two Date / Times
DTOFFSET - Add Offset to Date / Time
|
|
Related Topics:
Predefined Date / Time Structures
|
|
Rung Example:
|
|