Skip to main content

Relative Date node

Description

The Relative date node represents the date occurring a number of days before/after a dynamic date, e.g. 2 days before end of week, 5 days from today

Usage

The Relative date 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 - enable Before if required and then input the desired number of days.
alt text

Example

Fetch defects reported in the last 30 days

In full detail:

Fetch items of the Defects interface where their Reported Date attribute is greater than 30 days before now

alt text
See JSON code
{
"type": "Query",
"properties": {
"collectionCode": "Live",
"dodiCode": "designInterfaces_defects"
},
"children": [
{
"type": "GreaterThan",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_defectsReportedDate"
}
},
{
"type": "RelativeDateTime",
"properties": {
"relativeTo": "Now",
"value": ["-30.00:00:00.000"]
}
}
]
}
]
}