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 (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 A - designates 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 - designates 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 in seconds (DTA - DTB) - designates a 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:

 


Related Topics:

 


Rung Example: