Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes How to get date format in number? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to get date format in number?" Watch "How to get date format in number?" New topic
Author

How to get date format in number?

Sham Jowsaki
Ranch Hand

Joined: May 22, 2001
Posts: 146
Hi all,
How to get the following date() format
2002-12-31T12:00:00
Thanks
Jowsaki
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
Try using SimpleDateFormat something like:

Note, text you want in the string not to be used as a pattern (Such as the T or if you wanted the word Time) needs to be in single quotes.


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Richard Jensen
Ranch Hand

Joined: May 14, 2003
Posts: 67
SimpleDateFormat (1.3)
"yyyy-MM-dd'T'hh:mm:ss"
[ August 11, 2003: Message edited by: Richard Jensen ]
[ August 11, 2003: Message edited by: Richard Jensen ]

Richard
N 37 33 W 122 18
Sham Jowsaki
Ranch Hand

Joined: May 22, 2001
Posts: 146
Thanks Carl n Richard..
Working your stuffs SimpleDateFormat.
Thanks
Jowsaki
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get date format in number?