Fortinet Document Library

Version:


Table of Contents

Cookbook

6.2.0
Download PDF
Copy Link

Macros for formatting date and time in a dataset

The following macros can be used to fine tune date and time formatting in a dataset:

Macros

Description

Example

$flex_timescale

Time scale changes according to the report time period:

  • Time period > 28 days
  • Time period > 12 hours and <= 28 days
  • Time period > 4 hours and <= 12 hours
  • Time period > 1 hour
  • <= hour

 

  • Display day: 2018-02-25
  • Display hour: 2018-02-25 14:00
  • Display 30 min granularity: 2018-02-25 14:30
  • Display 5 min granularity: 2018-02-25 14:40
  • display 1 min granularity: 2018-02-25 14:42
$hour_of_day

Displays hour in 24 hr format.

18:00

$HOUR_OF_DAY

Displays date (YYYY-MM-DD) and hour in 24 hr format.

2018-01-13 18:00

$DAY_OF_MONTH

Displays month in format YYYY-MM-DD (2017-01-10).

2018-01-01

$day_of_month

Displays day of the month in two digits format 01-12.

01

$day_of_week

Displays number and name of the day of the week (WDAY 2-Mon).

Mon

Macros for formatting date and time in a dataset

The following macros can be used to fine tune date and time formatting in a dataset:

Macros

Description

Example

$flex_timescale

Time scale changes according to the report time period:

  • Time period > 28 days
  • Time period > 12 hours and <= 28 days
  • Time period > 4 hours and <= 12 hours
  • Time period > 1 hour
  • <= hour

 

  • Display day: 2018-02-25
  • Display hour: 2018-02-25 14:00
  • Display 30 min granularity: 2018-02-25 14:30
  • Display 5 min granularity: 2018-02-25 14:40
  • display 1 min granularity: 2018-02-25 14:42
$hour_of_day

Displays hour in 24 hr format.

18:00

$HOUR_OF_DAY

Displays date (YYYY-MM-DD) and hour in 24 hr format.

2018-01-13 18:00

$DAY_OF_MONTH

Displays month in format YYYY-MM-DD (2017-01-10).

2018-01-01

$day_of_month

Displays day of the month in two digits format 01-12.

01

$day_of_week

Displays number and name of the day of the week (WDAY 2-Mon).

Mon