Many data sets contain date and datetime fields. Transaction date for Sales Orders and Measurement date for IoT data streams are just a few examples. These are often too granular to observe patterns. Hence, higher level time components such as year and month are extracted out of these granular timestamps and then the data is summarized. SQL Frames provides time API to solve several of these use cases.
Time components can be absolute or relative.
Absolute time components
These components are unique across the time dimension.
|Year of the date field
|Calendar Quarter of the date field
|Calendar Month of the date field
|Date of the date field without hours/minutes/seconds
|ISO Week of the date field
Relative time components
These components are unique within a specific time frame such as a year or week.
|Quarter of the date field within the Year
|Month of the date field within the year
|ISO Week of the date field within the year
|Day of the date field within the year
|Day of the date field within the month
|Day of the date field within the ISO week
|Hour of the date field
|Hour of the date field within the day
|Minute of the date time field within the hour
Using both absolute time components and relative components, it is possible to display the summarized data as a PIVOT table to perform trend analysis. For example, year over year growth in each quarter.
Below data shows dates for one year into the past and one year into the future. The present and past are visualally distinguished using conditional formatting. This data should help understand the various time components.