Relative Time Phrases can be used in Syncari functions when evaluating or updating
datetime data types. Use a Relative Time Phrase when you need a
datetime value relative to the current
The relative time phrase construct has three parts to it:
- Operators: before or after.
- Amount: an integer value.
- Qualifier: the unit of time. Valid time units are: second/seconds, minute/minutes, day/days, week/weeks, month/months, and year/years.
Relative Time Phrase Examples
before 10 minutes
This will resolve to the current date/time minus 10 minutes.
after 10 minutes
This will resolve to the current date/time plus 10 minutes.
before 1 days
This will resolve to the current date/time minus 1 days.
after 7 days
This will resolve to the current date/time plus 7 days.
before 0 seconds
This will resolve to the current date/time.
Using Relative Time in a Condition
Here's an example that will check if a
datetime field is before the current
datetime. Using the relative time phrase "before 0 seconds" will return the current
Using Relative Time in a Set Value, Create Syncari Record or Update Syncari Record Function
datetime field can be updated to a
datetimevalue relative to the current time by using a relative time phrase.
For example, if you would like to set a
datetime field to the current
datetime you could set the new value to "before 0 seconds". Using '0' as the value is the key part of the relative time phrase that will set the value to the current time. The relative time phrase can be used on any function that is configured to update a date or
Here's an example of how to use it on the Set Value function: