Date conversion on 12 hours format date string

Hey there. is there any functionality to convert 12 hours format date(eg 2019-01-01 12:00:00 AM) string to date. At this time, i managed it as if(endswith(Date,‘PM’), rem(Time +12, 24), Time) something like that.