Skip to main content

Format date and time

With this function you can perform some date and time transformations like changing the format of a given date, adding days or hours to a date, etc.

Configuration​

Analytics config

Input parameters​

SectionParametersUsageMandatory
GeneralMethodThe change we want to apply to the date/time, which can be: Format Time, Add Time or Subtract Time.Yes
Insert your DateTimeDate and/or time to modify. Leaving this empty will take current date and time.No
Select an input format for the date insertedIndicate the format of the given date/time.Yes
Format Time*Select your date zoneDate zone of the given dateYes
Select your output datetime formatFormat desired for the outputYes
Add Time*YearsNumber of years to add to the dateNo
MonthsNumber of months to add to the date.No
DaysNumber of days to add to the date.No
HoursNumber of hours to add to the date/time.No
MinutesNumber of minutes to add to the date/time.No
Subtract Time*YearsNumber of years to subtract to the dateNo
MonthsNumber of months to subtract to the date.No
DaysNumber of days to subtract to the date.No
HoursNumber of hours to subtract to the date/time.No
MinutesNumber of minutes to subtract to the date/time.No

*Different input parameter sections will appear depending on the method chosen.

This is what different methods do:

  • Format Time: Format a given a date/time string as desired
  • Add Time: Add time to a given date
  • Subtract Time: Subtract time to a given date

Response parameters​

ParameterUsage
resultThe output of the operation.
errorAn error message if exist.

Format date and time with languages​

The difference between the simple one and this is that we can add a language code for the output.

Analytics config