Skip to main content
Roberty Studio
RPAFunctions

Date and Time Formatting

Date and Time Formatting

Converts a date from an input format to a defined output format. Essential for standardizing dates coming from different sources — such as systems that use the international format (YYYY-MM-DD) when the destination expects the Brazilian format (DD/MM/YYYY), or vice versa.


Options​

Input Format​

Select the format in which the input date is written. The format selected must match exactly the date provided in the Date to be formatted field. The available options are: DD/MM/YYYY, DD/MM/YYYY HH:mm:ss, DD [de] MMMM [de] YYYY, HH:mm, HH:mm:ss, HH:mm:ss:SSS, YYYY-MM-DD and YYYY-MM-DD HH:mm:ss.

Output Format​

Select the format in which the date must be returned after the conversion. The options are the same as in Input Format.

Date to be formatted​

Enter the date that will be converted. It can be a fixed text, a variable, a parameter or the return of another action.

Returns​

Javascript code​

js
actions["action-id"].date // date converted to the output format selected (Text)

Field selection​

  • date — date formatted in the output format selected (Text)

Rules and Conditions​

  • The date provided must match exactly the input format selected.
  • If the Date to be formatted field is left empty, the current date is used.