Formatting Times
You can format your cells to display both the date and time parts or just the date or just the time.
You can change the date and time number format applied to your cells by highlighting the cells and selecting (Format > Cells)(Number tab).
If none of the built-in formats display the date or time in the correct way you can create a custom date and time format.
Default Formats
Custom Formats
h | 5 | Hour as a number, no leading zero. |
hh | 05 | Hour as a number with a leading zero. |
m | 36 | Minute as a number, no leading zero. |
mm | 36 | Minute as a number with a leading zero. |
s | 4 | Second as a number, no leading zero. |
ss | 04 | Second as a number with a leading zero. |
s.0 | 4.0 | Second as a number, no leading zero and tenths of a second, no leading zero. |
s.00 | 4.00 | Second as a number, no leading zero and hundredths of a second, no leading zero. |
ss.0 | 04.0 | Second as a number, no leading zero and tenths of a second with a leading zero. |
ss.00 | 04.00 | Second as a number with a leading zero and hundredths of a second with a leading zero. |
h:mm AM/PM | 5:36 AM | Time based on a twelve hour clock with AM/PM notation |
h:mm am/pm | 5:36 AM | Time based on a twelve hour clock with AM/PM notation |
h:mm A/P | 5:36 a | Time based on a twelve hour clock with AM/PM notation |
h:mm a/p | 5:36 a | Time based on a twelve hour clock with a/p notation |
[h] | 5 | Time based on a twelve hour clock with a/p notation. Using square brackets allows you to display hours greater than 24. |
Important
You can quickly remove any date and time number formats from cells by highlighting them and pressing (Ctrl + Shift + "~"). This will change the format back to General.
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext