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.
It can be:
-
added to these comparison nodes:
- Equals
- Greater than
- Less than
- Not Equals
-
compared against an Attribute node (of Relative date type)
Configuration
- 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.
- Relative date - enable Before if required and then input the desired number of days.
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
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"]
}
}
]
}
]
}