| Author |
how to convert date to a string
|
Chitti pokala
Ranch Hand
Joined: Jan 11, 2005
Posts: 46
|
|
Hi I am using a date fucntion in jsp. I want to convert 2005-01-31 to 31-Jan-2005. How can I convert this...... Thanks in Advance.
|
 |
Sonny Gill
Ranch Hand
Joined: Feb 02, 2002
Posts: 1211
|
|
Have a look at DateFormat and SimpleDateFormat classes in java.text package. Here's an example - HTH.
|
The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56157
|
|
|
Not much to do with JSP, so moved to Java in General (intermediate).
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
friso dejonge
Ranch Hand
Joined: Jul 11, 2002
Posts: 162
|
|
Hi, There is a simple answer like the one below. But maybe it is more challenging to read the java tutorial: http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html regards, friso
|
swimming certificate (A & B), shoelaces diploma, and some useless java ones.
|
 |
Steve Morrow
Ranch Hand
Joined: May 22, 2003
Posts: 657
|
|
Calculating Java dates: Take the time to learn how to create and use dates Working in Java time: Learn the basics of calculating elapsed time in Java Formatting a Date Using a Custom Format Parsing a Date Using a Custom Format
|
 |
 |
|
|
subject: how to convert date to a string
|
|
|