Hi,
I am trying to convert string to date, but getting error.
I am getting date using :
URL xmlUrl = new URL(path);
URLConnection urlconn = xmlUrl.openConnection();
Date = new Date(urlconn.getLastModified());
and then I ma saving this date in a file , which saves in the following format :
Mon Jun 21 16:31:24 Asia/Karachi 2010
and then when later I read this date from file as a String, I again want to save it to a Date, but I am getting error.
I tried :
DateFormat format = DateFormat.getDateInstance();
date = format.parse(fileDate);
but I am getting error :
java.text.ParseException: Unparseable date: Mon Jun 21 16:31:24 Asia/Karachi 2010
Is there any way i can retrieve back the date.
Thanks