Help in generating time format

Hi All,

I got a request to generate date in below format.

"2007-01-02T15:44:36+11:00".

My question is: is the 'T' in it a standard format for GMT? What's the 'T' meaning here?

I tried SimpleDateFormat, but still couldn't get that.

See my code:

SimpleDateFormat formatDate = new SimpleDateFormat("yyyy-MM-ddHH:mm:ssZ");

System.out.println(formatDate.format(new Date()));

The output is:

2007-03-0811:30:31+1100

But how can I make it "2007-03-08T11:30:31+1100"

Is this a starand time format in Java?

thanks and regards,

auiagman

[617 byte] By [auiagmana] at [2007-11-26 20:50:19]
# 1
How can i say this... it's on the javadoc dude! Please, don't ask which one...
benubacha at 2007-7-10 2:14:50 > top of Java-index,Java Essentials,New To Java...
# 2

Hi,

Here is the Sample code

SimpleDateFormat formatDate = new SimpleDateFormat("yyyy-MM-dd");

SimpleDateFormat formatDate1 = new SimpleDateFormat("HH:mm:ssZ");

System.out.println(formatDate.format(new Date())+"T"+formatDate1.format(new Date()));

I hope this will fullfill your need.

penupatia at 2007-7-10 2:14:51 > top of Java-index,Java Essentials,New To Java...
# 3
> SimpleDateFormat formatDate = new> SimpleDateFormat("yyyy-MM-ddHH:mm:ssZ");> System.out.println(formatDate.format(new Date())); SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
benubacha at 2007-7-10 2:14:51 > top of Java-index,Java Essentials,New To Java...