I have a string in the pattern yyyy-MM-dd hh:mm a and i can get the time zone object separately in which the above string represents the date.
I want to convert this
Use SimpleDateFormat
String string1 = "2009-10-10 12:12:12 "; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z") sdf.setTimeZone(tz); Date date = sdf.parse(string1);