Hi,
I am receiving last modification date of a file, using below code :
xmlUrl = new URL("http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html");
URLConnection urlconn = xmlUrl.openConnection();
urlDate = new Date(urlconn.getLastModified());
In result I am getting date in below format:
Tue Dec 18 05:11:33 Asia/Karachi 2007
I want to change it to simple dd MMM yyyy format
I used :
SimpleDateFormat format = new SimpleDateFormat("dd MMM yyyy");
try {
tempDate = format.parse(urlDate.toString());
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
but it didn't help me to solve the issue and I am still getting the date in that above mentioned long format.
need urgent help.
Thanks