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. Hibernate
22. JPA
23. JSP
24. JSTL
25. Servlet
26. Web Services SOA
27. EJB3
28. Spring
29. PDF
30. Email
31. J2ME
32. J2EE Application
33. XML
34. Design Pattern
35. Log
36. Security
37. Apache Common
38. Ant
39. JUnit
Java
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Tutorial » Development » Formatting Date Time 
6. 9. 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. 9. Formatting Date Time
6. 9. 1. Formatting Time and Date: The Time and Date Format Suffixes
6. 9. 2. %tr: Formatting time and date
6. 9. 3. %tc: Display complete time and date information
6. 9. 4. %tl:%tM: Display just hour and minute
6. 9. 5. %tB %tb %tm: Display month by name and number
6. 9. 6. Display 12-hour time format
6. 9. 7. Display 24-hour time format.
6. 9. 8. Display short date format.
6. 9. 9. Display date using full names.
6. 9. 10. Display complete time and date information: using %T rather than %t.
6. 9. 11. Display hour and minute, and include AM or PM indicator.
6. 9. 12. The Time and Date Format Suffixes
6. 9. 13. Display several time and date formats
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.