Hello,
i’ve an input excel file with random date format (ddMMyyyy OR dd/MM/yyy OR ddMMyy, etc.),
considering that I’ll have to make a comparison between dates, for example calculating if it is greater or not to another date, how can I convert it in the correct way not knowing before the format?
You can simply convert most dates using either Convert.ToDateTime() or CDate, but this doesn’t work with all formats, and you could end up converting the date into the wrong format as well, which is why I didn’t explain this first.