I’m trying to create a form with two datepickers.
The first line (12. of December) works fine but the second line (13. of December) produces the error message below:
New-UDDatePicker -Label "xyy" -Value "12.12.2020 05:00:00"
New-UDDatePicker -Label "xyy" -Value "13.12.2020 05:00:00"
Cannot process argument transformation on parameter 'Value'. Cannot convert value "13.12.2020 22:11:11" to type "System.DateTime". Error: "String was not recognized as a valid DateTime.
I tried a lot of different methods to manipulate, parse and convert the date format. No success. I tried to split the initial string and to recreate the date string with join. No success.
It seems that somehow days with number higher then 12 are not accepted.
What I’m missing?