I have a input string, which I want to convert to datetime. Normally I could use Assign = Date.ParseExact(“17.03.2020”,“dd.MM.yyyy”,System.Globalization.CultureInfo.InvariantCulture). That works fine. The Challenge is, that in the end I need the format “dd.MM.yyyy”, but the input String can be in a different format. For example “5.3.2020” or “15.3.2020” or “1.10.20” and so on. This causes errors
Is there any solution for this? Any oppurtunity to recognize the format and to convert it?
Thank you very much!