Search:

Welcome

Login to contribute. Register if you haven't yet.

Need Support?

Search this site to find an answer. If you still need help, post a Question. Private or account-related support inquiries can be made at the Private Support forum.

Stay Informed

Are you receiving EditMe's monthly newsletter? Keep informed of product changes, tutorials and tips. Sign up here.

Date Formatting Codes

EditMe's util.formatDate method uses the following date formatting codes. This content is copied from the Java API documentation for SimpleDateFormat, which is used by EditMe's the formatDate method.

Letter Date or Time Component Examples
G Era designator AD
y Year 1996; 96
M Month in year July; Jul; 07
w Week in year 27
W Week in month 2
D Day in year 189
d Day in month 10
F Day of week in month 2
E Day in week Tuesday; Tue
a Am/pm marker PM
H Hour in day (0-23) 0
k Hour in day (1-24) 24
K Hour in am/pm (0-11) 0
h Hour in am/pm (1-12) 12
m Minute in hour 30
s Second in minute 55
S Millisecond 978
z Time zone Pacific Standard Time; PST; GMT-08:00
Z Time zone -0800

Some commonly used examples:

yyyy-MM-dd >> 2008-12-31

yyyy-MM-dd HH:mm:ss >> 2008-12-31 18:00:00

EEEE, MMMM d, yyyy >> Friday, October 3, 2008


EditMe News & Blog