You are in Browse directories FileFormat.Info » Browse directories Tips » Browse directories Java

Common Pattern Strings for java.text.SimpleDateFormat


Summary

These are some common pattern strings for java.text.SimpleDateFormat.


Detail

Name Format String Comments
RSS 2.0 EEE, dd MMM yyyy HH:mm:ss z Example:
Fri, 05 Dec 2008 09:01:25 EST
Atom (ISO 8601) yyyy-MM-dd'T'HH:mm:ssz You need to strip out the "GMT":
result.substring(0, 19) + result.substring(22, result.length());

See the W3C spec and Markus Kuhn's overview

Example:
2008-12-05T09:01:25EST

Online Test

Online SimpleDateFormat Test
Pattern
Time zone
Locale
 


Terms of Service | Privacy Policy | Contact Info