Am I missing something???
Your example code uses "01/01/2021 05:01:56' as the date/time. The error message you cite has "13/05/2021 12:13:04". But both examples are hardcoded.
It's possible that your problem is a "culture" problem. "13" works if it's properly interpreted as the day, but not if it's interpreted as the month.
However, both examples work . . . at least for me. Verify the culture you're using is appropriate (i.e. verify it with Get-Culture).
For your AM/PM question, it looks like you're using a non-USA format for the date, so is it also the case that you're coding the time in 24-hour format? If that's the case you should capitalize the "hh" in string. The lowercase "hh" interprets the time using a 12-hour format.