1. Home
  2. Configuration
  3. Date keyword functions

Date keyword functions

The date keyword functions can be used to alter the date which is provided when using a keyword. In the table below, replace the $KEY text by your date keyword.

unctionDescription
$KEY.minusYears(number)Returns the date with the specified number of years subtracted.
$KEY.plusYears(number)Returns the date with the specified number of years added.
$KEY.minusMonths(number)Returns the date with the specified number of months subtracted.
$KEY.plusMonths(number)Returns the date with the specified number of months added.
$KEY.minusDays(number)Returns the date with the specified number of days subtracted.
$KEY.plusDays(number)Returns the date with the specified number of days added.
$KEY.minusHours(number)Returns the date with the specified number of hours subtracted.
$KEY.plusHours(number)Returns the date with the specified number of hours added.
$KEY.minusMinutes(number)Returns the date with the specified number of minutes subtracted.
$KEY.plusMinutes(number)Returns the date with the specified number of minutes added.
$KEY.minusSeconds(number)Returns the date with the specified number of seconds subtracted.
$KEY.plusSeconds(number)Returns the date with the specified number of seconds added.
$date.format($KEY)Returns the date in the default format (dd/MM/yyyy HH:mm:ss).
$date.format(format, $KEY)Returns the date in the provided format. The provided format is a combination of the tokens from the table below.

Date format tokens

TokenDescription
yYear
DDay of the year
MMonth of the year
dDay of the month
aAM or PM
hHour of the day (1-12)
KHour of the day (0-11)
kHour of the day (1-12)
HHour of the day (0-23)
mMinute of the hour (0-60)
sSecond of the minute (0-60)

Report type examples

NotationDescription
$date.format(“dd/MM/yyyy”,$reportDate.minusDays(7))The date returned by the $KEY entry will be deducted with 7 days and be formatted as dd/MM/yyyy.
$date.format(“yyyyMMdd”,$KEY.minusHours(1))The date returned by the $KEY entry will be deducted with 1 hour and be formatted as yyyyMMdd.
Updated on 15/06/2021
Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support