Date
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   mani_kandan
Posted On:   Tuesday, February 26, 2002 08:58 PM

			
Sir,
I have date object.This date object have the following
format as 2-03-2002 .How to get the following format
March 2 2002 from the that date object?.

Thanks,

Regards,
Manikandan A

Re: Date

Posted By:   Heinrich_Soebke  
Posted On:   Friday, March 1, 2002 12:36 AM

use a formatter

e.g.


String getShortDate(GregorianCalendar pDate) {
SimpleDateFormat formatter
= new SimpleDateFormat ("yyMMdd");
return formatter.format(pDate.getTime());
}

For concerns of your desired format have a look at the class documentation. The above code returns for your example "020302".
About | Sitemap | Contact