DataPool User Guide

Version 2.13 | Published November 30, 2018 ©

DataTime

images/download/attachments/30910247/plugins_datatime-icon.png
DataTime plugin translates the value of the incoming data into date/time elements and stores these values to a set of predefined DataPool variables.

Predefined Variables

The predefined variables are:

  • _DAY: Day of the month (1-31).

  • _DAYNAME: Name of the day in the week. Names are defined in the Day Names parameter.

  • _FHOUR: Hours/min/sec described in floating point number (decimal) i.e. 6:30 is converted to 6.5.

  • _HOUR: Hour of the day (0-23).

  • _HOURNAME: Set of name description for the hours of the day. Names are defined in the Hour Names parameter.

  • _MIN: Minute of the hour.

  • _MONTH: Month number in the year (1-12).

  • _MONTHNAME: Name of the month. Names are defined in the Month Names parameter.

  • _MSEC: One thousandth of a second in the second (0-999). This variable is used only when the Resolution parameter is set to milliseconds.

  • _SEC: Second number in a minute (0-59).

  • _WEEKDAY: Number of the day in the week (1-7).

  • _YEAR: Number of the year using four digits.

  • _RELDAY: Relative day number, where 0 (zero) is today. This variable returns an integer value only (i.e. the difference between the received data and the current system time).

  • _RELDAYNAME: Relative day name, where yesterday, today and tomorrow are used for -1, 0, 1 values received in the RELDAY variable. All other days are displayed by name (Sunday, etc.).

  • _HOURS_SHORT: Show 12 hour clock time.

  • _AMPM: Display AM or PM (used with HOURS_SHORT).

    images/download/attachments/30910247/plugins_datatime.png

Unique Parameters

  • DP variables Prefix: Defines a prefix that is added to the DataTime variables. The prefix is used to distinguish one set of time parameters from the other, enabling the usage of multiple time values. Default is T1. If the prefix is set to T1, the corresponding variables are:

    • T1_DAY

    • T1_DAYNAME

    • T1_FHOUR

    • T1_HOUR

    • T1_HOURNAME

    • T1_MIN

    • T1_MONTH

    • T1_MONTHNAME

    • T1_MSEC

    • T1_SEC

    • T1_WEEKDAY

    • T1_YEAR

  • DP variables Scope: Uses data variables as part of the structure the variables were defined in when set to Local. When set to Global, the time data variables are used as global DataPool variables.

  • Input is Machine Time: Defines if the time is read from the machine’s clock or from the data field. If set to On, the Field Name parameter is disabled and additional parameters are enabled:

  • Input Field Format: Selects the input field units.

  • Output Field Time Zone:

    • As Is: Leaves timezone data as set.

    • UTC -> Local: Converts UTC timezone to local timezone.

    • Local -> UTC: Converts local timezone to UTC.

  • Offset Field: Defines the offset units.

  • Offset: Defines the number of offset units from the current machine time.

  • Leading Zero: Defines if the zero character is added to the single digit values (0-9). This option is useful when formatting the time display.

  • Day Names: Defines a set of names for the days of the week, to be used by the _DAYNAME variable. The parameter should contain seven names, comma separated. If the parameter is left blank, DataTime uses the default of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday.

  • Month Names: Defines a set of names for the months of the year, to be used by the _MONTHNAME variable. The parameter should contain twelve names, comma separated. If the parameter is left blank, DataTime uses the default of January, February, etc.

  • Hour Names: Defines a set of names for the hours of the day, to be used by the _HOURNAME variable. The parameter should contain twenty four names, comma separated. If the parameter is left blank, DataTime uses the default of Midnight, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, Noon, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23.

  • Replace Yesterday By: Allows the replacement of the term yesterday for another one. This feature is useful when working on a language other than English.

  • Replace Today By: Allows the replacement of the term today for another one. This feature is useful when working on a language other than English.

  • Replace Tomorrow By: Allows the replacement of the term tomorrow for another one. This feature is useful when working on a language other than English.

  • Initialize: Calculates variable values now.

  • Reset: Recalculates variable values now.

  • Week Director