I am asking this question so i can avoid writing long if-else statements in my code.
I have a date string and the format is supposed to be dd/MM/yyyy, unfornately on days like 5th of may 2022, the date string appears as 5/5/2022. I am trying to avoid if-else statements i simply want to make this 5/5/2022 appear as 05/05/2022 so it can be validated perfectly using DateTime.TryParseExact.
Please how do i do this ?
I am trying to avoid this here because it can get really wild