-
Notifications
You must be signed in to change notification settings - Fork 1
Time Formatting
flarom edited this page Jun 5, 2025
·
1 revision
| Code | Example | Description |
|---|---|---|
%a |
Wed | Abbreviated weekday name |
%A |
Wednesday | Full weekday name |
%w |
3 | Weekday as a decimal number |
%d |
05 | Day of the month with leading zero |
%-d |
5 | Day of the month without leading zero |
%B |
June | Full month name |
%b |
Jun | Abbreviated month name |
%m |
06 | Month as a number with leading zero |
%-m |
6 | Month as a number without leading zero |
%Y |
2025 | Full year with century |
%y |
25 | Year without century, as two digits |
%H |
14 | Hour (24-hour clock) with leading zero |
%-H |
14 | Hour (24-hour clock) without leading zero |
%I |
02 | Hour (12-hour clock) with leading zero |
%-I |
2 | Hour (12-hour clock) without leading zero |
%p |
PM | AM or PM indicator |
%M |
23 | Minute with leading zero |
%-M |
23 | Minute without leading zero |
%S |
45 | Second with leading zero |
%-S |
45 | Second without leading zero |
| Code | Example | Description |
|---|---|---|
%f |
000000 | Microsecond as a decimal number, zero-padded to 6 digits |
%z |
-0300 | UTC offset in the form ±HHMM[SS[.ffffff]]
|
%Z |
São Paulo | Time zone name |
%j |
156 | Day of the year as a zero-padded decimal number |
%-j |
156 | Day of the year as a decimal number. |
%U |
22 | Week number of the year |
%-U |
22 | Week number of the year |
%W |
22 | Week number of the year |
%-W |
22 | Week number of the year |
%c |
Wed Jun 5 14:23:45 2025 | System date and time representation |
%x |
06/05/25 | System date representation |
%X |
14:23:45 | System time representation |
%% |
% | A literal '%' character |
Learn the basic syntax of markdown and the Cohesion flavored markdown
Learn more advanced markdown applications
Learn how to use metadata on your documents to better organize your files
Learn how to create scripts and automation inside of Cohesion documents
Learn how to use commands to speed up your writing