How to modify the date format on the script depending fr or Us for resolve : Could not compare "06/04/2021 11:41:15" to "30/05/2021 06:06:16". Error: "Cannot convert value "30/05/2021 06:06:16" to type "System.DateTime". Error: "String was not recognized as a valid DateTime.""
But I have to admit that I don't understand the problem. There is only one valid format, which is ISO 8601 to avoid any ambiguity and to add lexical sortablilty as property to an date/time literal.
Thus my first step is always to get the best available input.
Especially when it is about date formats, using ambiguous date formats will always lead to lesser data quality.