Migration Ticket SimpleDateFormat issue

What format string should I use in my date pattern for
String datePattern = “yyyy-MM-dd HH:mm:ss.SSSXXX”;
SimpleDateFormat dateFormat = new SimpleDateFormat(datePattern);

I tried several format strings but keep getting a
String date 2015-08-11 00:35:33.717000000 cannot be parsed using java.text.SimpleDateFormat@5af85354 format: Unparseable date: “2015-08-11 00:35:33.717000000”
String date 2015-08-21 00:15:06.017000000 cannot be parsed using java.text.SimpleDateFormat@5af85354 format: Unparseable date: “2015-08-21 00:15:06.017000000”

What format should i use

1 Like

Hi @KarthikMurthy0,

We need only timestamp in the date pattern. Meaning Date and Time only. Try this: “yyyy-MM-dd HH:mm:ss”.

Kanika

Thanks Kanika That worked