Time Mask Characters
Time Mask strings can use the following characters
| Code |
Representation |
| h |
Hours with no leading zero for single-digit hours; 12-hour clock |
| hh |
Hours with leading zero for single-digit hours; 12-hour clock |
| H |
Hours with no leading zero for single-digit hours; 24-hour clock |
| HH |
Hours with leading zero for single-digit hours; 24-hour clock |
| m |
Minutes with no leading zero for single-digit minutes |
| mm |
Minutes with leading zero for single-digit minutes |
| s |
Seconds with no leading zero for single-digit seconds |
| ss |
Seconds with leading zero for single-digit seconds |
| t |
One character time marker string, such as A or P |
| tt |
Multi-character time marker string, such as AM or PM |
Examples
| Mask |
Explanation |
| "hh':'mm':'ss tt" |
Format the time as hour, colon, minutes, seconds in a 12 hour clock with AM or PM at the end. Eg: 11:29:40 AM |
| "HH:mm" |
Format the time using a 24 hour clock with only hour and minute |
Notes
- The use of quotes around the semi-colon is optional.
- The double quotes in the example masks are needed when using the FormatTime function and need to be omitted when used via the field properties dialog.