DateTime Indicator and Setter

The DateTime Indicator and DateTime Setter gadgets allow you to display and modify time and date values on your HMI. The Indicator displays either the PLC time or any time value of a DT-type variable, while the Setter also allows these values to be modified.

It has the following properties:

- for a terminal.graph type template select “the complete PLC” (the root item of the variables tree)

- for a web.graph type template select “Use Target Device RTC”.

Format Possibilities

Similar to the Digital Indicator, the DateTime gadgets use specific tokens in the Format property to define how the time, date, or duration is displayed.

Note: Only one token is allowed per format definition. For tokens containing `.n`, replace `n` with the desired number of decimal places (e.g., use `M.2` for minutes with two decimal places).

IDE Token Component Description Compatible Variable Types
d Day Day component (00 - 31) (*When used with a TIME variable, 'd' displays the total number of days with zero-padding to 2 places) DATE, DT, TIME
m Month Month component (01 - 12) DATE, DT
Y Year Year component (e.g., 1982) DATE, DT
H Hour Hour component (00 - 23) DT, TOD, TIME
M Minute Minute component (00 - 59) DT, TOD, TIME
S Second Second component (00 - 59) DT, TOD, TIME
f Millisecond Millisecond component (0 - 999) DT, TOD, TIME
d.n Day (Decimal) Day component with decimal places (no zero padding) TIME
H.n Hour (Decimal) Hour component with decimal places (no zero padding) TIME
M.n Minute (Decimal) Minute component with decimal places (no zero padding) TIME
S.n Second (Decimal) Second component with decimal places (no zero padding) TIME
dd Total Days Total overall days count (no zero padding) TIME
HH Total Hours Total overall hours count (no zero padding) TIME
MM Total Minutes Total overall minutes count (no zero padding) TIME
SS Total Seconds Total overall seconds count (no zero padding) TIME
dd.n Total Days (Decimal) Total overall days count with decimal places (no zero padding) TIME
HH.n Total Hours (Decimal) Total overall hours count with decimal places (no zero padding) TIME
MM.n Total Minutes (Decimal) Total overall minutes count with decimal places (no zero padding) TIME
SS.n Total Seconds (Decimal) Total overall seconds count with decimal places (no zero padding) TIME

Using Units and Spacing Example: If you want to display the string “Time Duration 2.5 min”, you would set the gadget properties as follows:

*(With automated spaces enabled, the system automatically converts “Time Duration2.5min” into “Time Duration 2.5 min” without requiring manual spacing).*

Examples of DateTime Formatting on an HMI Panel: