Date functions
Learn about date functions in the Digibee Integration Platform and how to use them.
The functions were created to:
Speed up the creation of your integrations even more.
Decrease the complexity of your pipelines.
Simplify data conversions and transformations during the flow of your pipelines.
The date functions treat, generate and convert dates and are available for components that support Double Braces expressions. To know how to provide information to the components using this resource, refer to Double Braces Functions.
Check the Oracle SimpleDateFormat documentation to obtain more information about date formats and how to use it in functions such as FORMATDATE.
FORMATDATE
By using Double Braces, you can combine the function with the access to the input JSON element of a component.
The function is applied to format date and time (including the possibility of treating your locale and timezone).
Syntax
The items included with "?" can be defined with null value.
date format definition: dd/MM/yyyy. It's also possible to define the 'timestamp' word only.
the value will be always converted with ISO Zoned Date/Time.
Input value:
Conversion examples:
NOW
By using Double Braces, you can combine the function with the access to the input JSON element of a component.
The function is applied to return double value from a whole number.
Syntax
The return of this function will be the current date in milliseconds.
SUMDATE
By using Double Braces, you can combine the function with the access to the input JSON element of a component.
The function returns the sum or subtraction of a determined date and time given a time unit.
Syntax
● milliseconds: timestamp
● unit: time unit (accepted values: hour, minute, second, day, month and year)
● value: date and time values to be added
● zoneId: zone of the informed date (standard: UTC)
The accepted zones (UTC) are:
Australia/Darwin
Australia/Sydney
America/Argentina/Buenos_Aires
Africa/Cairo
America/Anchorage
America/Sao_Paulo
Asia/Dhaka
Africa/Harare
America/St_Johns
America/Chicago
Asia/Shanghai
Africa/Addis_Ababa
Europe/Paris
America/Indiana/Indianapolis
Asia/Kolkata
Asia/Tokyo
Pacific/Apia
Asia/Yerevan
Pacific/Auckland
Asia/Karachi
America/Phoenix
America/Puerto_Rico
America/Los_Angeles
Pacific/Guadalcanal
Asia/Ho_Chi_Minh
Let's say you need to obtain date and time adding 10 seconds to it. You can do the following:
The expected result will be:
TOISODATE
By using Double Braces, you can combine the function with the access to the input JSON element of a component.
The function is applied to convert date and time to ISO Date (including the possibility to treat your locale and timezone).
Syntax
The items included with "?" can be defined with null value.
definition of the date format: dd/MMMM/yyyy HH:mm:ss. It's also possible to define the 'timestamp' word only.
If the timezone isn't defined, the UTC will be used.
Input value:
Conversion examples:
DIFFDATE
This function allows you to calculate the difference of time between two dates.
Syntax
The dates that will be used must be in timestamp format.
The timeUnit parameter only accept the values: year, month, day, hour, minute, second e millisecond.
The calculation applied will be: timestamp2 - timestamp1
Input values:
Application examples:
Obs.: If the function receives 2 dates that have a difference lower than 1 based on the time unit given, the result will be 0. If the timestamp1 parameter is greater than timestamp2, the function will return the negative difference.
Other functions
You can also read about these functions:
Last updated