Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

date object with Z at the end

807589Jan 9 2009 — edited Jan 9 2009
All, how can I can get a date object like this:

2009-01-09T05:00:00.000Z

I tried this:
Date dd = new Date();
		DateFormat df = new SimpleDateFormat("yyyy-MM-dd:HH:mm:ss.SSSZ");
		System.out.println(df.format(dd));
but i get this as result:
2009-01-09:10:38:03.156-0500

Any ideas?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2009
Added on Jan 9 2009
19 comments
1,497 views