posted 18 years ago
Try this one
public String calToStr(Calendar cal) throws Exception
{
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
//You can use Date format as per your requrirment : yyyy-MM-dd
String dateString = formatter.format(cal.getTime());
return dateString;
}
Thanks,
Santosh
[ September 16, 2005: Message edited by: Santosh Maskar ]
[ September 16, 2005: Message edited by: Santosh Maskar ]