Date with AM PM

Hi @marina.dutta

Try the below syntax:

dateTimeValue = DateTime.ParseExact(str_attached_files_date, "M/d/yyyy h:mm tt", System.Globalization.CultureInfo.InvariantCulture).ToString("M/d/yyyy")

Regards

1 Like