Timeframes

For date fields, you can provide multiple timeframe options directly within the View YAML.

Instead of requiring stakeholders to manipulate dates manually, you can pre-define useful breakouts like year, month, or day.

Loading code...

Here’s a quick reference of all the timeframe options you can use, with explanations for each one.

OptionDescription
yeartruncRounds down to the first day of the year
quartertruncRounds down to the first day of the quarter
monthtruncRounds down to the first day of the month
weektruncRounds down to the first day of the week
daytruncRounds down to midnight of that day
hourtruncRounds down to the start of the hour
minutetruncRounds down to the start of the minute
secondtruncRounds down to the start of the second
yearExtracts the year component
quarterExtracts the quarter (1-4) of the year
monthExtracts the month (1-12) of the year
weekExtracts the week (1-52) of the year
dayofyearExtracts the day (1-366) of the year
dayofmonthExtracts the day (1-31) of the month
dayofweekExtracts the day (0-6) of the week
hourExtracts the hour (0-23) of the day
minuteExtracts the minute (0-59) of the hour
secondExtracts the second (0-59) of the minute
nullNo function is applied

In the canvas UI, timeframes options are revealed by clicking on the expandable field.

Loading...