[Analytics] Time Formatting for Charts
The content in this article is appropriate for: Administrators and Supervisors
This article can also be found on our partner website: Time formatting for charts | Looker | Google Cloud
You can format time values in SC Analytics (Looker) charts using the following syntax. You can also string these elements together to create formats of your choosing.
Format Type | Description | Use This Expression |
---|---|---|
Time | ||
Time | Milliseconds as a decimal number, i.e. 000 to 999 |
|
Time | Second as a two-digit number, i.e. 00 to 59 |
|
Time | Minute as a two-digit number, i.e. 00 to 59 |
|
Time | Hour as a decimal number (24-hour clock), i.e. 00 to 23 |
|
Time | Hour as a decimal number (12-hour clock), i.e. 01 to 12 |
|
Time | Either AM or PM |
|
Date | ||
Date | Day of the year as a decimal number, i.e. 001 to 366 |
|
Date | Zero-padded day of the month, i.e. 01 to 31 |
|
Date | Space-padded day of the month (equivalent to |
|
Date | Full weekday name, i.e. Monday, Tuesday, Wednesday |
|
Date | Abbreviated weekday name (3-letter), i.e. Mon, Tue, Wed |
|
Date | Weekday as a decimal number (Sunday as the first day of the week), i.e. 0 to 6 |
|
Week | ||
Week | Week number of the year (Sunday as the first day of the week) as a two-digit number, i.e. 00 to 53 Note: |
|
Week | Week number of the year (Monday as the first day of the week) as a two-digit number, i.e. 00 to 53 Note: |
|
Month | ||
Month | Two-digit month, i.e. 01 through 12 (1-12 format not currently available) |
|
Month | Abbreviated month name, i.e. Jan, Feb, Mar |
|
Month | Full month name, i.e. January, February, March |
|
Year | ||
Year | Two-digit year, i.e. 00 to 99 |
|
Year | Four-digit year, i.e. 2000, 2001, 2002 |
|
Combination | ||
Combination | Full time, of the form "%H:%M:%S", i.e. 23:56:12 |
|
Combination | Full date, of the form "%m/%d/%Y", i.e. 01/27/2014 |
|
Combination | Datetime format with the following: "%a %b %e %H:%M:%S %Y", i.e. Mon Jan 1 23:56:04 2014 |
|
💡 Note: Quarter time formatting is not supported. Consider including a quarter timeframe in your date dimension_group and selecting that quarter timeframe in the visualization to display and filter data by quarters.