6 Replies Latest reply: Apr 22, 2008 11:22 PM by 807591 RSS

    Convert String ("2008-Mar-25 08:33:36") to Date 2008-Mar-25 08:33:36

      I have a Date in String format. I need to convert it to Date in the same format. As in the subject the String is "2008-Mar-25 08:33:36" ; I need to convert it to a Date in the same format. Is there any way of doing it?
      I tried:
      DateFormat toSdf = new SimpleDateFormat("yyyy-mmm-dd hh:mm:ss");
      Date d = toSdf.parse("2008-Mar-25 08:33:36");// At this point it throws exception "java.text.ParseException: Unparseable date: "2008-Mar-25 08:33:36"

      I know similar threads have been posted. But im posting this again as none of the answers solved my problem. Inconvenience regretted.

      Thanks in Advance,