how to convert string [] temp to Timestamp:
String[] temp = line.split(",");
for (int i = 1; i < temp.length; i++) {
objekt.setTimestamp(timestamp);}
if i use
Timestamp ts= Timestamp.valueOf(temp[0]);
objekt.setTimestamp(ts);}
i get this exceptionTimestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
if i use this
SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy hh:mm:ss");
java.util.Date parsedDate = dateFormat.parse(temp[0]);
java.sql.Timestamp timestamp = new java.sql.Timestamp(parsedDate.getTime());
i get " java.text.ParseException: Unparseable date: "06/11/2013 22:00"
thank you everyone for suggestions, i can read the timestamp but i must to read this format month-day-year: 06/18/2013 21:00:00, and with SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm"); i get 2013-06-18 18:00:00, if i change MM or dd or yyyy hier "MM/dd/yyyy HH:mm" i can't even get the month first then date and year