| Author |
convert date to dd-mm-yyyy pattern
|
sameera liyanage
Ranch Hand
Joined: Nov 25, 2008
Posts: 643
|
|
i have a Date object.i need to convert it to the dd-mm-yyyy pattern.
can anyone send me the code?
|
 |
Kumar Agaram
Greenhorn
Joined: May 27, 2009
Posts: 1
|
|
private SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy");
String dateStr = sdf.format(dateObject);
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32651
|
|
Welcome to JavaRanch Kumar Agaram, and thank you for the answer.
|
 |
 |
|
|
subject: convert date to dd-mm-yyyy pattern
|
|
|