am having a string like this.
Thu Oct 07 11:31:50 IST 2010
I want to convert this into its exact date time format to store it in SQL.
Use this format -'EEE MMM dd HH:mm:ss z yyyy'
EEE MMM dd HH:mm:ss z yyyy
Date date = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy") .parse("Thu Oct 07 11:31:50 IST 2010"); System.out.println(date);