Custom Date Formatting
Column formatting is available for each column via it's column menu. To apply a custom format to a date column, open the column's menu, and go to Format > Custom.
Alternatively, DateFormat allows you to apply a format to column values by means of the formula bar.
Formats can be applied independently or combined.
Example 1: The format "%a %B %d %Y" translates to abbreviated weekday name (%a), month name (%B), day number (%d), and year (%Y). This format applied to 2019-02-10 15:22:23 returns Sun February 10 2019.
Example 2: The format "%Y-%m-%d" translates to year (%Y), month number (%m), and day number (%d). This format applied to 2019-02-10 15:22:23 returns 2019-02-10.
The following date formats are available:
Format | Example | Description |
%Y | 2018 | Year with century as a decimal number |
%y | 18 | Year without century as a decimal number (00--99) |
%m | 07 | Month number (01--12) |
%b | Jul | Abbreviated month name, always 3 letters |
%B | July | Full month name (if available, otherwise abbreviated form) |
%a | Sun | Abbreviated weekday name, always 3 letters |
%A | Sunday | Full weekday name (if available, otherwise abbreviated form) |
%d | 08 | Day number (00--31) |
%H | 00 | Hour (24-hour clock) as a decimal number (00--23) |
%I | 12 | Hour (12-hour clock) as a decimal number (01--12) |
%M | 34 | Minute as a decimal number (00--59) |
%S | 60 | Second as a decimal number (00--60) |
%p | AM | AM or PM |
%L | 000 | Milliseconds as a decimal number (000--999) |
%f | 000000 | Microseconds as a decimal number (000000--999999) |
%Z | -07:00 | Time zone offset |
%% | % | A percent sign |