Skip to main content

Relative date and time values

Provide a dynamic date or time

Each node represents a single dynamic value, calculated from a chosen point in time:

  • Relative Date - offset by a number of days, e.g. 2 days before end of week, 5 days from today

  • Relative Date Time - offset by a number of time units, e.g. 1 hour 30 minutes before end of day, 2 days 8 hours from now

Usage

These nodes are inputs, so you can add them to the segments of these comparison nodes:

An Equals node with two empty segments

Compatibility

These nodes each fill one segment. The other must hold a reference node of the same value type.

NodeAccepted Value TypeNotes
AttributeSame as the Value nodeUse the Pathfinder to choose an attribute, on the queried item or a linked item
PropertyDate TimeOnly if Last edit date is chosen and the comparison is Less than or Greater than

Options

Select a node to access its options:

  • Delete - remove the node from the segment.
  • Parameter - select a compatible parameter to use as a placeholder. The value is provided when the query runs.
  • Relative to - choose a dynamic starting point from the list. Defaults to Now.

    The Relative to picker, listing dynamic starting points such as Now, Start of day, End of day and Last Monday

Instead of a parameter, select the relevant field and set the offset directly:

  • Relative Date - enable Before if required, then enter the desired number of days.

  • Relative Date Time - enable Before if required, then enter the desired number of time units.

    The Relative date time configuration, with Before enabled and an offset of 30 days

Examples

Relative Date

Fetch defects reported in the last 30 days.

In AQS terms:

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

A Greater than node comparing the Reported Date attribute to a Relative Date of 30 days before now
See JSON code

This code may reference designs, interfaces, attributes or items that don't exist in your company project.

{
"type": "Query",
"properties": {
"collectionCode": "Live",
"dodiCode": "designInterfaces_defects"
},
"children": [
{
"type": "GreaterThan",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_defectsReportedDate"
}
},
{
"type": "RelativeDate",
"properties": {
"relativeTo": "Now",
"value": ["-30.00:00:00.000"]
}
}
]
}
]
}

Relative Date Time

Fetch all assets that were edited today.

In AQS terms:

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

A Greater than node comparing the Last edit date property to a Relative Date Time of 0 seconds from start of day
See JSON code

This code may reference designs, interfaces, attributes or items that don't exist in your company project.

{
"type": "Query",
"properties": {
"collectionCode": "Live",
"dodiCode": "designInterfaces_assets"
},
"children": [
{
"type": "GreaterThan",
"children": [
{
"type": "ItemProperty",
"properties": {
"itemPropertyName": "lastEditDate"
}
},
{
"type": "RelativeDateTime",
"properties": {
"relativeTo": "StartOfDay",
"value": ["0.00:00:00.000"]
}
}
]
}
]
}