I have always had problems while converting Dates which are generated by the System into a String. Here's a small code for it.
SimpleDateFormat strDate = new SimpleDateFormat("dd-MMM-yyyy");
String dateStr= strDate.format(new Date() );
System.out.println(dateStr);
No comments:
Post a Comment