Hitachi Vantara Pentaho Community Wiki
Child pages
  • Date Formatting Table
Skip to end of metadata
Go to start of metadata

Symbol

Meaning

Type

Example

G

Era

Text

"GG" -> "AD"

y

Year

Number

"yy" -> "03"
"yyyy" -> "2003"

M

Month

Text or Number

"M" -> "7"
"M" -> "12"
"MM" -> "07"
"MMM" -> "Jul"
"MMMM" -> "December"

d

Day in month

Number

"d" -> "3"
"dd" -> "03"

h

Hour (1-12, AM/PM)

Number

"h" -> "3"
"hh" -> "03"

H

Hour (0-23)

Number

"H" -> "15"
"HH" -> "15"

k

Hour (1-24)

Number

"k" -> "3"
"kk" -> "03"

K

Hour (0-11 AM/PM)

Number

"K" -> "15"
"KK" -> "15"

m

Minute

Number

"m" -> "7"
"m" -> "15"
"mm" -> "15"

s

Second

Number

"s" -> "15"
"ss" -> "15"

S

Millisecond (0-999)

Number

"SSS" -> "007"

E

Day in week

Text

"EEE" -> "Tue"
"EEEE" -> "Tuesday"

D

Day in year (1-365 or 1-364)

Number

"D" -> "65"
"DDD" -> "065"

F

Day of week in month (1-5)

Number

"F" -> "1"

w

Week in year (1-53)

Number

"w" -> "7"

W

Week in month (1-5)

Number

"W" -> "3"

a

AM/PM

Text

"a" -> "AM"
"aa" -> "AM"

z

Time zone

Text

"z" -> "EST"
"zzz" -> "EST"
"zzzz" -> "Eastern Standard Time"

X

Time zone offset

Text

"XXX" -> "-08:00"

'

Escape for text

Delimiter

"'hour' h" -> "hour 9"

''

Single quote

Literal

"ss''SSS" -> "45'876"

  • No labels

2 Comments

  1. user-00c0f

    There appears to be a few typos above:

    • Minute should be "m" not "M" 
    • AM/PM should be "a" not "A"
    • Time zone should be "z.." not "Z"
    • etc...

    It appears that all the Symbols are capitalized!

  2. user-24e81

    Go ahead and edit the page and make the changes you just suggested. Most of the Pentaho community wiki is editable if you are registered and logged in.