Plugin:HistoryPP/en/Date and time formatting: Difference between revisions
Jump to navigation
Jump to search
+see also (hidden options) |
+{{content}} |
||
| Line 4: | Line 4: | ||
== Simple examples == | == Simple examples == | ||
Example: ''January 2, 2006 3:05:44'' | Example: ''January 2, 2006 3:05:44'' | ||
{ | {{Content:HistoryPP/DateFormatting-Example}} | ||
== Format == | == Format == | ||
Here is the full list of variables with examples given for date and time ''January 2, 2006 3:05:44'' | Here is the full list of variables with examples given for date and time ''January 2, 2006 3:05:44'' | ||
{ | {{Content:HistoryPP/DateFormatting-Format}} | ||
Latest revision as of 13:21, 28 June 2015
DateTimeFormat STRING key is used to change date/time representation in history grid. You will need Database Editor plugin to add/edit the key.
Simple examples
Example: January 2, 2006 3:05:44
| Value | Result | Note |
|---|---|---|
| c | 02/01/2006 3:05:44 | Date and time format is default system format |
| ddd, mmm d, yy | Mon, Jan 2, 06 | |
| dd/mm/yyyy hh:nn:ss | 02/01/2006 3:05:44 | |
| dddd, d mmmm, yyyy | Monday, 2 January, 2006 | |
| hh:nn am/pm | 03:05 am | am/pm converts time to 12-hour format |
| h:n:s a/p | 3:5:44 a | a/p converts time to 12-hour format |
Format
Here is the full list of variables with examples given for date and time January 2, 2006 3:05:44
| Value | Description | Example |
|---|---|---|
| y | Year last 2 digits | 06 |
| yy | Year last 2 digits | 06 |
| yyyy | Year as 4 digits | 2006 |
| m | Month number without leading zero | 1 |
| mm | Month number with leading zero | 01 |
| mmm | Short month name | Jan |
| mmmm | Full month name | January |
| d | Day number without leading zero | 2 |
| dd | Day number with leading zero | 02 |
| ddd | Short day name | Mon |
| dddd | Full day name | Monday |
| ddddd | Date as short date format (system-dependent) | 02/01/2006 |
| dddddd | Date as long date format (system-dependent) | 02 January 2006 |
| h | Hour without leading zero | 3 |
| hh | Hour with leading zero | 03 |
| n | Minute without leading zero | 5 |
| nn | Minute with leading zero | 05 |
| s | Second without leading zero | 44 |
| ss | Second with leading zero | 44 |
| z | Millisecond without leading zero | 21 |
| zzz | Millisecond as 3 digits | 021 |
| am/pm | Time in 12-hour format with "am" or "pm" | am |
| a/p | Time in 12-hour format with "a" or "p" | a |
| t | Short time format (system-dependent) | 3:05 |
| tt | Long time format (system-dependent) | 3:05:44 |
| c | Short date format + long time format (system-dependent) | 02/01/2006 3:05:44 |