9 Replies Latest reply: May 25, 2008 8:44 AM by 807591 RSS

    cast String date to Date date

      I have a string date in the formate of 2008-05-21. I want this to convert in to Date formate but need to exactly the same. When I use
      DateFormat dateformat=new SimpleDateFormat("yyyy-mm-dd");
      Date dd= dateformat.parse(date)
      It print some thing like this
      Mon Jan 21 00:05:00 GMT+05:30 2008

      But I want like 2008-05-21. Can some one help me. Thanks in Advance.