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.
Try this:
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy");
For future reference read up on the SimpleDateFormat class: http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html