Date and Time Formatting Patterns
The following Date and Time formatting patterns are supported by the Designer:
Pattern | Description | Example | Remark |
---|---|---|---|
| Abbreviated weekday name | Mon | |
| Full weekday name | Monday | |
| Abbreviated month name | Feb | |
| Full month name | February | |
| Year / 100 as decimal number [00,99] | 20 | |
| Day of the month as decimal number [01,31] | 12 | |
| Equivalent to | 02/12/18 | |
| Day of the month, single digits with leading space [1,31] | 12 | |
| Equivalent to | 2018-02-13 | |
| Equivalent to | Feb | |
| Hour (24-hour clock) as decimal number [00,23] | 15 | |
| Microseconds as decimal number [000000,999999] | 123456 | |
| Hour (12-hour clock) as decimal number [01,12] | 03 | |
| Day of the year as decimal number [001,366] | 043 | Conflicts with |
| Month as a decimal number [01,12] | 02 | |
| Minute as a decimal number [00,59] | 20 | |
| <newline> | \n | |
| Offset from UTC as +HH:MM | +00:00 | Only for DateTime composing/printing. |
| am or pm (12-hour clock) | pm | |
| Time in am/pm notation, equivalent to | 03:20:12 pm | |
| Time in 24-hour notation, equivalent to | 15:20 | |
| Second as decimal number [00,59] | 12 | |
| <tab> | \t | |
| Time in 24-hour notation, equivalent to | 15:20:12 | |
| Weekday as decimal number [1,7], with 1 representing Monday | 1 | |
| Week number of the year as decimal number [01,53]. The first Sunday of January is the first day of week 1; days in the new year before this are in week 0. | 06 | |
| Equivalent to | 12-Feb-2018 | |
| Week number of the year as decimal number [01,53]. If the week containing 1 January has four or more days in the new year, then it is considered week 1. Otherwise, is the last week of the previous year, and the next week is week 1. Both January 4th and the first Thursday of January are always in week 1. | 07 | |
| Weekday as a decimal number [0,6], with 0 representing Sunday | 1 | |
| Week number of the year as decimal number [01,53]. The first Monday in January is the first day of week 1; days in the new year before this are in week 0. | 07 | |
| Last two digits of the year as decimal number [00, 99] | 18 | |
| Year as decimal number [0000,9999] | 2018 | |
| Locale time zone as offset from UTC in ISO 8601:2001 standard format (+hhmm or -hhmm). | +0100 | |
| Equivalent to | Mon, 12 Feb 2018 15:20:12 +0000 | Only for DateTime composing/printing. |
| Percent sign | % | Only for DateTime parsing. |
Standard Patterns
Some very common patterns can be directly abbreviated:
Constant | Equivalent Placeholder Expression | Example | Remark |
---|---|---|---|
rfc822 |
| Mon, 12 Feb 2018 15:20:12 +0000 | Not fully compatible, because |
rfc850 |
| Monday, 2018-02-12 15:20:12 GMT | |
rfc1123 |
| Mon, 12 Feb 2018 15:20:12 GMT | |
rfc2822 |
| Mon, 12 Feb 2018 15:20:12 +0000 | Not fully compatible because |
sap-idoc-dats |
| 20180212 | |
sap-idoc-tims |
| 152012 | |
Constant | Parsed Expression | Example | Remark |
xsd:date |
| 2018-02-12Z | |
xsd:dateTime |
| 2018-02-12T15:20:12.153688Z | Microseconds are skipped if 0: 2018-02-12T15:20:12Z |
xsd:time |
| 15:20:12.224376Z | Microseconds are skipped if 0: 15:20:12Z |
Unsupported Patterns
The following patterns are not supported - neither for parsing nor composing:
%c
, %g
, %G
, %k
, %l
, %x
, %X
, %Z
.
Related Pages: