Skip to main content

Relative Date Time node

Description

The Relative date time node represents the date and time occurring a number of time units before/after a specific date and time, e.g. 1 hour 30 minutes before end of day, 2 days 8 hours from now

Usage

The Relative date time node is an input, so it can be added to the segments of comparison nodes.

alt text

It can be:

Configuration

alt text
  • Parameter - select a compatible parameter to use as a placeholder value (if any have been defined in the query).
  • Relative to - the default value is Now. To change it, select it and choose from the list of dynamic dates.
alt text
  • Relative date time - enable Before if required and then input the desired number of time units.
alt text

Example

Fetch all assets that were edited today

In full detail:

Fetch items of the Assets interface where their Last edit date property is greater than 0 seconds from Start of Day

alt text
See JSON code
{
"type": "Query",
"properties": {
"collectionCode": "Live",
"dodiCode": "designInterfaces_assets"
},
"children": [
{
"type": "GreaterThan",
"children": [
{
"type": "ItemProperty",
"properties": {
"itemPropertyName": "lastEditDate"
}
},
{
"type": "RelativeDateTime",
"properties": {
"relativeTo": "Now",
"value": ["0.00:00:00.000"]
}
}
]
}
]
}