| Author |
convert custom date format
|
Edward Durai
Ranch Hand
Joined: Oct 09, 2004
Posts: 223
|
|
consider, i have a input like 13/12/2008 (dd/mm/yyyy) or 13-12-2008, I want to change the format to 12/13/2008 (mm/dd/yyyy) or 12-13-2008. Is it possible? Is there any function available? Please advise.
|
Thank You<br />Edward
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12907
|
|
You could parse the string with the input format, then format the resulting Date object with the output format. For example:
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: convert custom date format
|
|
|