Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have date in String format.
2022-04-01 17:08:35
when i converted it to date using parseDate
context.datetostr = TalendDate.parseDate("yyyy-MM-dd HH:mm:ss",context.modified_date);
System.out.println(context.datetostr)
My Output is coming like this
strtodate :Fri Apr 01 17:08:35 IST 2022
I need output like this 2022-04-01 17:08:35 in date format
hi @Darmesh Sureshbabu , have you set the date pattern you want in the output schema ?
Send me love and kudos
Screenshots of your setup would help a lot...
You could also try with the TalendDate function. Something like this:
TalendDate.formatDate("yyyy-MM-dd HH:mm:ss", context.modified_date)
Change your date format from dd/MM/yyyy to yyyy-MM-dd using the steps below: string date = DateTime "dd/MM/yyyy," ParseExact(SourceDate