| Flag | Beschreibung |
|---|---|
| - | Left-Align |
| + | Sign (+/-) |
| 0 | 0000... |
| , | Group 1'000'000 |
| ( | (Neg.Numbers) |
| Conversion | Beschreibung | Object null | String "TEST" | Integer 74 | Character 'A' | Float, Double 1.00 | Boolean true |
|---|---|---|---|---|---|---|---|
| %s | String | "null" | "TEST" | "74" | "A" | "1.0" | "true" |
| %d | Integer | "null" | Exception | "74" | Exception | Exception | Exception |
| %f | Floating Point | "null" | Exception | Exception | Exception | "1.000000" | Exception |
| %c | Character | "null" | Exception | "J" | "A" | Exception | Exception |
| %b | Boolean | "false" | "true" | "true" | "true" | "true" | "true" |
| %x | Hexadecimal ⇑ | "null" | Exception | "4a" | Exception | Exception | Exception |
| %X | Hexadecimal ⇓ | "NULL" | Exception | "4A" | Exception | Exception | Exception |
| %n | \n = Newline, no other arguments | ||||||
| Conversion | Alt. | Beschreibung | Resultat new java.util.Date() System.currentTimeMillis() |
|---|---|---|---|
| %tF | %tY-%tm-%td | Datum | "2020-12-31" |
| %tD | %tm/%td/%ty | Datum | "12/31/20" |
| %tT | %tH:%tM:%tS | Zeit | "14:58:00" |
| %tR | %tH:%tM | Stunde/Minute | "14:58" |
| %tc | %ta %tb %td %tT %tZ %tY | Stunde/Minute | "Do Dez 31 14:58:00 MEZ 2020" |