Search the web
Sign In
New User? Sign Up
ISO8601 · To bring the International Date and Time Format to the attention of the Internet world and beyond.

Group Information

  • Members: 335
  • Category: Data Formats
  • Founded: Nov 30, 1999
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

  Messages Help
Advanced
Re: Java Date Time   Message List  
Reply Message #210 of 2212 |
Here is a sample of how to generate ISO 8601 extended time-stamp format in Java

final SimpleDateFormat ISO8601UTC = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss,SSS'Z'");// 24 characters
ISO8601UTC.setTimeZone(TimeZone.getTimeZone("UTC")); // UTC == GMT
System.out.println(ISO8601UTC.format(new Date(987654321012L)));// 2001-04-19T04:25:21,012Z

SimpleDateFormat, TimeZone, and Date are part of the standard JDK.

Thu Sep 6, 2001 6:22 pm

wellithy@...
Send Email Send Email

Message #210 of 2212 |
Expand Messages Author Sort by Date

Here is a sample of how to generate ISO 8601 extended time-stamp format in Java final SimpleDateFormat ISO8601UTC = new ...
wellithy@... Send Email Sep 6, 2001
7:10 pm

... FWIW, Generating and parsing and format a UTC value using SimpleDateFormet at is easy enough as you have shown. Sadly, while the parsing of +500 style...
P A Hill & E V Goodall
goodhill@... Send Email
Sep 7, 2001
5:14 pm

... Just for the record, don't you mean "HH" rather than "hh" ? -- Ian...
ian@... Send Email Sep 15, 2001
10:49 am

... Only if he meant 24 hours in a day and didn't want am/pm hours. see http://java.sun.com/j2se/1.3/docs/api/java/text/SimpleDateFormat.html...
P A Hill & E V Goodall
goodhill@... Send Email
Sep 17, 2001
9:09 am

... characters ... http://java.sun.com/j2se/1.3/docs/api/java/text/SimpleDateFormat.html I'm aware of the definition of SimpleDateFormat. My point was that ...
ian@... Send Email Sep 17, 2001
12:26 pm

Thanks Ian for catching this. I mis-typed, I meant "HH" not "hh". (I copied and pasted from an old code-documentation that I have, the one that I am running...
wellithy@... Send Email Sep 17, 2001
10:09 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help