Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Date time formats

  • Updated: 7/12/2021
    • 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': Enables you to specify a year as 'yy' or 'yyyy'.
  • 'M': Enables you to 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': Enables you to specify a day as 'dd' or 'd'.
  • 'E': Enables you to specify day of the week as 'EEE' (Sun-Sat) or 'EEEE' (Sunday-Saturday).
  • 'h' or 'H': Enables you to specify an hour as 'hh' or 'HH'.
  • 'm': Enables you to specify a minute in an hour as 'mm'.
  • 's': Enables you to specify a second in a minute as 'ss'.
  • 'S': Enables you to specify a millisecond as 'SSS'.
  • 'z': Enables you to specify a time zone such as 'Pacific Standard Time', 'Indian Standard Time', and so on.
  • 'Z': Enables you to specify an offset time for a time zone such as '+0550' for 'Indian Standard Time'.
You can use the above convention to specify the custom format you want to use for converting a datetime value. Below are some of the examples that use the above convention:
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 22:15:35.889
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
Send Feedback