how to convert String date to Date object.
Hi guys,
I'm trying to convert a string date to a date object.
The string date (comes from javaScript) looks like this:
Sat Nov 4 2006
I have this method, and wonder what should come in the XXXXX section:
publicstatic Date getDate(String str)
{
try
{
Date date =new SimpleDateFormat("XXXXX ").parse(str);
return date;
}catch (ParseException e)
{
e.printStackTrace();
returnnull;
}
}
I initially thought its: DDDMMMYYYY but I was wrong.
thanks

