Pass default timestamp in Datetimestamp date formatting
Hi,
I need to pass date with timestamp and then store that date in db column (Mysql).
If date is "2019-04-24T01:39:06.541" then it stored as it is in db column "2019-04-24 01:39:06" (date timestamp, no milliseconds required)
If date is "2019-04-24T01:23" then it need to be store in db column as : "2019-04-24 01:23:00" (date timestamp with default 00 seconds, no milliseconds required)
I am doing above thing as: TalendDate.parseDate("yyyy-MM-dd'T'HH:mm:ss", "2019-04-24T01:39:06.541") Its working correctly, but for TalendDate.parseDate("yyyy-MM-dd'T'HH:mm:ss", "2019-04-24T01:23"), throwing error as : Unparseable date.
How to pass default values 00, if minute or seconds part is not in Input string.