Formatting Time and Date: The Time and Date Format Suffixes : Formatting Date Time « Development « Java Tutorial

Java Tutorial
1. Language
2. Data Type
3. Operators
4. Statement Control
5. Class Definition
6. Development
7. Reflection
8. Regular Expressions
9. Collections
10. Thread
11. File
12. Generics
13. I18N
14. Swing
15. Swing Event
16. 2D Graphics
17. SWT
18. SWT 2D Graphics
19. Network
20. Database
21. JSP
22. JSTL
23. Servlet
24. Web Services SOA
25. Email
26. J2ME
27. J2EE Application
28. XML
29. Design Pattern
30. Log
31. Security
32. Apache Common
Java
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Tutorial » Development » Formatting Date Time 
6. 7. 1. Formatting Time and Date: The Time and Date Format Suffixes
SuffixReplaced By
aAbbreviated weekday name
AFull weekday name
bAbbreviated month name
BFull month name
cStandard date and time string formatted as day month date hh::mm:ss tzone year
CFirst two digits of year
dDay of month as a decimal (01 to 31)
Dmonth/day/year
eDay of month as a decimal (1 to 31)
Fyear-month-day
hAbbreviated month name
HHour (00 to 23)
IHour (01 to 12)
jDay of year as a decimal (001 to 366)
kHour (0 to 23)
lHour (1 to 12)
LMillisecond (000 to 999)
mMonth as decimal (01 to 13)
MMinute as decimal (00 to 59)
NNanosecond (000000000 to 999999999)
PLocale's equivalent of AM or PM in uppercase
pLocale's equivalent of AM or PM in lowercase
QMilliseconds from 1/1/1970
rhh:mm (12-hour format)
Rhh:mm (24-hour format)
SSeconds (00 to 60)
sSeconds from 1/1/1970 UTC
Thh:mm:ss (24-hour format)
yYear in decimal without century (00 to 99)
YYear in decimal including century (0001 to 9999)
zOffset from UTC
ZTime zone name


6. 7. Formatting Date Time
6. 7. 1. Formatting Time and Date: The Time and Date Format Suffixes
6. 7. 2. %tr: Formatting time and date
6. 7. 3. %tc: Display complete time and date information
6. 7. 4. %tl:%tM: Display just hour and minute
6. 7. 5. %tB %tb %tm: Display month by name and number
w__ww.___j___av___a_2___s__.c__o_m | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.