This is an old revision of the document!
When you place cells with time values in the report you need to specify format modifier for them.
Please refer to the below tables:
Input | Example | Description |
---|---|---|
L | 04/09/1986 | Date (in local format) |
LL | September 4 1986 | Month name, day of month, year |
LLL | September 4 1986 8:30 PM | Month name, day of month, year, time |
LLLL | Thursday, September 4 1986 8:30 PM | Day of week, month name, day of month, year, time |
LT | 08:30 PM | Time (without seconds) |
LTS | 08:30:00 PM | Time (with seconds) |
Input | Example | Description |
---|---|---|
YYYY | 2014 | 4 or 2 digit year |
YY | 14 | 2 digit year |
Y | -25 | Year with any number of digits and sign |
Q | 1..4 | Quarter of year. Sets month to first month in quarter. |
M MM | 1..12 Month number | |
MMM MMMM | Jan..December | Month name in locale set |
D DD 1..31 Day of month | ||
Do | 1st..31st | Day of month with ordinal |
DDD DDDD | 1..365 | Day of year |
X | 1410715640.579 | Unix timestamp |
x | 1410715640579 | Unix ms timestamp |
Input | Example | Description |
---|---|---|
H HH | 0..23 | Hours (24 hour time) |
h hh | 1..12 | Hours (12 hour time used with a A.) |
k kk | 1..24 | Hours (24 hour time from 1 to 24) |
a A | am pm | Post or ante meridiem (Note the one character a p are also considered valid) |
m mm | 0..59 | Minutes |
s ss | 0..59 | Seconds |
S SS SSS | 0..999 | Fractional seconds |
Z ZZ | +12:00 | Offset from UTC as +-HH:mm, +-HHmm, or Z |
The template string is parsed for moment token characters, which are replaced with the duration's value for each unit type. The moment tokens are:
years: Y or y months: M weeks: W or w days: D or d hours: H or h minutes: m seconds: s ms: S
Escape token characters within the template string using square brackets.
moment.duration(123, “minutes”).format(“h [hrs], m [min]”); “2 hrs, 3 mins”