Convert to date format -"YYYY-MM-DD"

Hi @gokul1904 ,

if you can identified input format then only you can able to convert excepted format

Ex:

(input) stTest= 30/12/2022

DateTime.ParseExact(stTest,“dd/MM/yyyy”,system.Globalization.CultureInfo.InvariantCulture).ToString(“MM-dd-yyyy”)

Output = 12-30-2022

Thanks,
Rajkumar

1 Like