Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Date time formats

  • Updated: 2022/04/19
    • Automation 360 v.x
    • Build
    • RPA Workspace

Date time formats

Various predefined formats are available in RPA Workspace that allow you to specify a custom format when you convert a datetime value to a string value.

The To string action enables you to convert a datetime value to a string value. This action also enables you to select a predefined datetime format or specify a custom format.

Predefined datetime format

When you convert a datetime value to a string value, the predefined datetime formats are available in the Formats list. The following predefined datetime formats are available:
  • BASIC_ISO_DATE: Converts the datetime value to a yyyymmdd+offset value string value.
  • ISO_LOCAL_DATE: Converts the datetime value to a yyyy-mm-dd string value.
  • ISO_OFFSET_DATE: Converts the datetime value to a yyyy-mm-dd+offset value string value. The offset value indicates the difference between the local time and UTC in hours and minutes.
  • ISO_DATE: Converts the datetime value to a yyyy-mm-dd+offset value or yyyy-mm-dd string value. The system adds an offset value if it is available.
  • ISO_LOCAL_TIME: Converts the datetime value to a hh:mm:ss.SSS string value.
  • ISO_OFFSET_TIME: Converts the datetime value to a hh:mm:ss.SSS+offset value string value. The offset value indicates the difference between the local time and UTC in hours and minutes.
  • ISO_TIME: Converts the datetime value to a hh:mm:ss.SSS, or hh:mm:ss.SSS+offset value string value. The offset value indicates the difference between the local time and UTC in hours and minutes.
  • ISO_LOCAL_DATE_TIME: Converts the datetime value to a yyyy-mm-ddThh:mm:ss.SSS string value.
  • ISO_OFFSET_DATE_TIME: Converts the datetime value to a yyyy-mm-ddThh:mm:ss.SSS+offset value string value. The offset value indicates the difference between the local time and UTC in hours and minutes.
  • ISO_ZONED_DATE_TIME: Converts the datetime value to a yyyy-mm-ddThh:mm:ss.SSS+offset value[zone id] string value. The offset value indicates the difference between the local time and UTC in hours and minutes. The 'zone id' in the format represents the time zone.
  • ISO_DATE_TIME: Converts the datetime value to a yyyy-mm-ddThh:mm:ss.SSS, yyyy-mm-ddThh:mm:ss.SSS+offset value, or yyyy-mm-ddThh:mm:ss.SSS+offset value[zone id] string value.
  • ISO_ORDINAL_DATE: Converts the datetime value to a yyyy-[day of the year], or yyyy-[day of the year]+offset value string value. For example, if the datetime value is 'January 25, 2018', it is formatted as '2018-25' where '25' indicates the day of the year.
  • ISO_WEEK_DATE: Converts the datetime value to a yyyy-[week of the year]-[day of the week], or yyyy-[week of the year]-[day of the week]+offset value string value. For example, if the datetime value is 'January 25, 2018', it is formatted as '2018-W4-4' where 'W4' indicates that it is the fourth week of the year and '4' indicates the day of that week.
  • ISO_INSTANT: Converts the datetime value to a yyyy-mm-ddThh:mm:ss.SSSZ string value.
  • RFC_1123_DATE_TIME: Converts the datetime value to a [day of the week], [day of the month] [month in 'MMM' format] [year in 'YYYY' format] hh:mm:ss, or [day of the week], [day of the month] [month in 'MMM' format] [year in 'YYYY' format] hh:mm:ss+offset value string value. For example, if the datetime value is '2018-01-25 10:15', it is formatted as 'Thu, 25 December 2018 10:15:00GMT'. The 'GMT' indicates that there is no offset available.

Custom datetime format

Use predefined conventions to specify a custom datetime format. The following conventions are available:
  • 'y': Specify a year as 'yy' or 'yyyy'.
  • 'M': Specify a month as 'M', 'MM', 'MMM' (abbreviated name of the month, for example, Jan, Feb), or 'MMMM' (full name of the month, for example, January, February).
  • 'd': Specify a day as 'd' or 'dd'.
  • 'D': Specify a day in a year as 'D' or 'DD'.
  • 'E': Specify day of the week as 'EEE' (Sun-Sat) or 'EEEE' (Sunday-Saturday).
  • 'h' or 'H': Specify an hour as 'hh' or 'HH'.
    Note: HH is a 24-hour time format and hh is a 12-hour time format with AM or PM.
  • 'a': Specify an AM/PM marker for the 12-hour time format
  • 'm': Specify a minute in an hour as 'mm'.
  • 's': Specify a second in a minute as 'ss'.
  • 'S': Specify a millisecond as 'SSS'.
  • 'z': Specify a timezone, such as 'Pacific Standard Time' and 'Indian Standard Time'.
  • 'Z': Specify an offset time for a timezone, such as '+0550' for 'Indian Standard Time'.
Important: On computers where the display language is set to Simplified Chinese or Traditional Chinese, when you use the dd-MMM-yyyy custom datetime format to convert a datetime value to a string value, the output might show incorrectly.
You can use the preceding convention to specify the custom format that you want to use for converting a datetime value. Some examples that use the preceding convention are as follows:
Format Sample output
yyyy-MM-dd 2018-09-30
yyyy-M-d 2020-9-8
dd-MM-yyyy 25-12-2018
yyyy-MM-dd HH:mm:ss 2018-25-12 23:50:55
hh:mm:ss.SSS a 10:15:35.889 AM / 10:15:35.889 PM
yyyy-MM-dd HH:mm:ss.SSS 2018-12-25 23:50:55.999
yyyy-MM-dd HH:mm:ss.SSS Z 2018-12-25 23:50:55.999 +0530
h.mm a 4.10 PM
D 'days', yyyy 365 days, 2019
Send Feedback