Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm receiving a date string in the following format but I can't find a way to convert it using parseDate. I've tried a bunch of different format strings.
TalendDate.parseDate("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",Var.var1)
Hi,
Just realized you had an example in the subject of your message.
The following seems to work, I removed the milleseconds from the format ('SSS') as they are not in your example date.
System.out.println(TalendDate.parseDate("yyyy-MM-dd'T'HH:mm:ss'Z'","2017-09-06T23:10:25Z"));
Result : Wed Sep 06 23:10:25 CEST 2017
Hope this helps!
Hi,
Can you post some examples of date strings you're receiving? Then i'll give it a go here.
Where are you receiving them from?
Hi,
Just realized you had an example in the subject of your message.
The following seems to work, I removed the milleseconds from the format ('SSS') as they are not in your example date.
System.out.println(TalendDate.parseDate("yyyy-MM-dd'T'HH:mm:ss'Z'","2017-09-06T23:10:25Z"));
Result : Wed Sep 06 23:10:25 CEST 2017
Hope this helps!
Try this
TalendDate.parseDate("yyyy-MM-dd HH:mm:ss",Var.var1)