Date functions are useful for formatting and evaluating date/time field values. You can combine date functions with other types of functions in your Field Pipeline to achieve data automation and data normalization use cases.
Add to Date
This function adds to a date/time value. You can use this function to add seconds, minutes, hours, days, months or years to a date/time value.
Configuration
1. Enter a label for the node. This will be helpful with identifying the node when viewing your Entity Pipeline.
2. Enter a Description that will explain what the function is configured to do.
3. Set the Amount to Add. This should be set as a number.
4. The Insert Token option allows you to set an Amount to Add value from a field.
5. Select the Unit to use with the Amount to Add. This is a pick list field with these options: Seconds, Minutes, Hours, Days, Months, Years.
Day of Month
This function evaluates an input date value returns the integer value for the day-of-month from 1 to 31.
Configuration
You can configure the Node Label and Description on this function. There are no other configurable fields. The function should be connected to a node that passes a date or date/time value.
Examples:
If the input date is 2020-03-22, the value returned by the function will be 22.
Day of Week
This function evaluates an input date and returns the integer value for the day-of-week.
1 - Monday
2- Tuesday
3 - Wednesday
4 - Thursday
5 - Friday
6 - Saturday
7 - Sunday
Configuration
You can configure the Node Label and Description on this function. There are no other configurable fields. The function should be connected to a node that passes a date or date/time value.
Day of Year
This function evaluates an input date and returns the integer value for the day-of-year. The value returned by this function will be an integer from 1 to 366 (366 for the last day in a leap year).
Configuration
You can configure the Node Label and Description on this function. There are no other configurable fields. The function should be connected to a node that passes a date or date/time value.
Date Format
Formats the given date into a date-time string using the date time pattern supplied.
Configuration
1. Enter a label for the node. This will be helpful with identifying the node when viewing your Entity Pipeline.
2. Enter a Description that will explain what the function is configured to do.
3. The Format Pattern is used to format the date/time value.
4. The Insert Token option allows you to set a Format Pattern from a field value.
Example:
The Format Pattern, yyyy-MM-dd'T'HH:mm:ssZ, will format a Date/Time value like this:
2019-07-07T00:00:00Z
Is After Now
This function compares the input date/time value to the current time. The function will return True
if the input value is after now, otherwise the function will return False
.
Configuration
You can configure the Node Label and Description on this function. There are no other configurable fields. The function should be connected to a node that passes a date or date/time value.
Is Before Now
This function compares the input date/time value to the current time. The function will return True
if the input value is before now, otherwise the function will return False
.
Configuration
You can configure the Node Label and Description on this function. There are no other configurable fields. The function should be connected to a node that passes a date or date/time value.
Now
This function returns the current date time in this format, 2021-01-05T01:19:06.158148Z[Etc/UTC]
Configuration
You can configure the Node Label and Description on this function. There are no other configurable fields. The function does not utilize the input value it will output the current date/time.
Subtract from Date
This function subtracts from a date/time value. You can use this function to subtract seconds, minutes, hours, days, months or years from a date/time value.
Configuration
1. Enter a label for the node. This will be helpful with identifying the node when viewing your Entity Pipeline.
2. Enter a Description that will explain what the function is configured to do.
3. Set the Amount to Subtract. This should be set as a number.
4. The Insert Token option allows you to set an Amount to Subtract value from a field.
5. Select the Unit to use with the Amount to Subtract. This is a pick list field with these options: Seconds, Minutes, Hours, Days, Months, Years.
Date Difference Function
In field and entity pipelines, we compare information stored in Syncari with the information received from another system. Frequently, one of the actions is to compare two dates with one another to find the elapsed time between them.
The Date Difference function helps you keep track of different date fields, including support for Date Time fields. Select the fields you’d like to compare and the date difference unit, and calculate spans like the time from create date to converted date for a lead.
If you want to compare a date field to a relative time, you can do that with Relative Time Phrases. For example, to compare against today's current date/time, you can write:
before 0 seconds
Here are the supported relative time phrases:
- Before
- After
- Last
- Next