Date and Time Formats Variable

You must specify a date and time format for the Automation Engine and object properties within the name of the variables that return a date or a time. The following table lists the variables that are affected and informs you about the formats that are supported.

Certain characters that occur in some formats must not be used in variable names. Therefore, you must specify the formats that include such characters in the variable name as shown below:

  • Time format: Within a variable name, you must specify time formats that include a colon character (:) with an underscore _").
  • For example: &$TIME_HH_MM_SS# returns the time in the format HH:MM:SS

  • Date format: You can use a hyphen (-), dot (.) or slash (/) character in date formats. In this case, you must also use an underscore instead of these characters in the variable name. Additionally, you must specify the character that is included in the format at the end of the format: For a point, you append the string _p, for a slash, you append _s and for a dash, you append _d.

Examples

  • &$PHYS_DATE_YY_MM_DD_p# supplies the date in the format YY.MM.DD
  • &$PHYS_DATE_YY_MM_DD_d# supplies the date in the format YY-MM-DD
  • &$PHYS_DATE_MM_DD_YY_s# supplies the date in the format MM/DD/YY.

Keys

  • Time

    Variables: &$PHYS_TIME_format# , &$TIME_format#

    Format used in variable Format displayed
    HHMMSS HHMMSS
    HH_MM_SS HH:MM:SS
    HHMM HHMM
    HH_MM HH:MM
    HH HH
    MM MM
  • Date

    Variables: &$DATE_format#, &$LDATE_format#, &$PHYS_DATE_format#

    Format used in variable Format displayed
    YY YY
    YYYY YYYY
    YYMMDD YYMMDD
    YY_MM_DD_p YY.MM.DD
    YY_MM_DD_d YY-MM-DD
    YYYYMMDD YYYYMMDD
    YYYY_MM_DD_p YYYY.MM.DD
    YYYY_MM_DD_d YYYY-MM-DD
    DD DD
    DDMMYY DDMMYY
    DDMMYYYY DDMMYYYY
    DD_MM_YY_p DD.MM.YY
    DD_MM_YY_d DD-MM-YY
    DD_MM_YYYY_p DD.MM.YYYY
    DD_MM_YYYY_d DD-MM-YYYY
    LLL LLL
    MM MM
    MMDDYY MMDDYY
    MMDDYYYY MMDDYYYY
    MM_DD_YY_s MM/DD/YY
    MM_DD_YYYY_s MM/DD/YYYY
    DD_MON_YYYY_d DD-MON-YYYY
    DD_MON_RR_d DD-MON-RR
    MM_DD_YYYY_d MM-DD-YYYY
    MMDDRR MMDDRR
    DDMMRR DDMMRR
    MM_DD_RR_d MM-DD-RR
    MM_DD_RR_s MM/DD/RR
    TT TT
    WW WW

Special formats that you must specify as shown in the variable name:

  • WEEK_NR: The number of the week to which the date belongs to is returned (43, for example).
  • WEEKDAY_NR: The number of the week day (7, for example)
  • YEAR_9999: The year is shown as a four-digit number (2012, for example)
  • YEAR_99: The year is shown in a two-digit number (12, for example)
  • WEEKDAY_XX: The variable returns the two-digit abbreviation of the weekday that belongs to the date.

See also: