Conversion of DOB from mmddyy to mmddyyyy

hi Team,

I am facing issue while trying to convert the DOB for certain range of years, the conversion logic that I am using is,

DateTime.ParseExact("211290", "mmddyy", DateTimeFormatInfo.InvariantInfo).ToString("mmddyyyy")

If the DOB that is 211290 I am getting the correct result as 12211990.
In the same way if I change the DOB to 071429 getting the result as 07142029.

Can anybody let me know if I am making any mistake at the time of conversation. Please let me know, as this is a Production issue we are in a critical stage.

Thanks & Regards

Harsha

Hi @harshavardhan3457

Please try this

DateTime.ParseExact(“211290”, “MMddyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“MMddyyyy”)

what is 21 is it minutes or month

How should it know whether the “29” is 1929 or 2029?

you have given mmddyy in your expression,

in uipath

mm - minute
MM- month