Topic: DMD0037

Help File Version: 2.9.4.37

DTOFFSET - Add Offset to Date / Time


The Add Offset to Date / Time (DTOFFSET) instruction adds a specified amount of time to the contents of a Date / Time structure.

 

 

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.

 

Starting Date / Time - specifies the Date / Time structure that contains the beginning Date and Time. This can be any of the system-defined Date / Time structure, or any user-defined Date / Time structure.

 

Offset - specifies the amount of time to add to the Starting Date / Time.

 

  • Constant - the amount of time to add is a fixed amount of time specified in number of days / hours / minutes / and seconds. The editor will normalize this value, for example, if a value of 99 seconds is entered the value will be stored as 1 minute and 39 seconds.

Negative - if checked the Constant value for the Offset is deemed negative, this option allows for predating .

  • Variable - specifies the numeric location where the amount of time (in seconds) to add is stored. This can be any readable numeric location.

 

Ending Date / Time - specifies a Date / Time structure to store the result. This can be any of the system-defined User Date / Time structures, or any user-defined Date / Time structure.

 


Status Display:

 

The status display shows the Offset value fully-qualified values for Date / Time both structures.

 


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: