Using Variables In Selections: DateTime Variables

DateTime variables are indicated in your System Variables folders by the DateTime icon icon. In most respects, DateTime variables behave identically to Date variables, but provide the extra ability to define and select a time range.

Time Rule dialog

However, when creating relative DateTime selections, there are additional options available within the dialog that facilitate analysis such as:

  • Select people who have transacted so far today

  • Select people who have booked in the last 3 hours

These options and the results returned are dependent upon how frequently your system data is refreshed.

  • Now - is the DateTime currently and will be fixed at the point at which the request is received by the server for the current piece of analysis. When it is run again a new Now will be used.

  • This Minute - when used in the From part of the rule, it will default to the ‘start of’ This Minute. When used in the To part of the rule, it will default to the ‘end of’ This Minute.

  • This Hour - when used in the From part of the rule, it will default to the ‘start of’ This Hour. When used in the To part of the rule, it will default to the ‘end of’ This Hour.

    Relative options

When using this functionality, you also have the following offsets:

  • Seconds - move forward or backward by N second

  • Minutes - move forward or backward by N minutes

  • Hours - move forward or backward by N hours

    Relative offsets

Whatever rule has been set, in all cases, expect to see the start and end times that will be returned in the boxes at the bottom of the dialog:

From To dialog

When a Now option (or even This Minute) is selected then, as you interact with the control and make a change, the resulting values will alter each time you make a change.