am has a line like this.
Thu Oct 07 11:31:50 IST 2010
I want to convert this to my exact date time format in order to save it in SQL.
I am familiar with so many string conversions to date, as shown below.
String dateString = "2001/03/09";
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/mm/dd");
Date convertedDate = dateFormat.parse(dateString);
But I need to convert the string as Thu Oct 07 11:31:50 IST 2010a date format with a timestamp.
Can someone explain the correct way to convert this to its java.util.Date. Format?
source
share