Date Conversion In M/d/yyyy

Hi All,

I am trying to convert date 2025-01-16 to 1/16/2025 basically in M/dd/yyyy format.

I have used below but getting error

Hi @dutta.marina
Try this:
DateTime.ParseExact(“2025-01-16”, “yyyy-MM-dd”, System.Globalization.CultureInfo.InvariantCulture).ToString(“M/dd/yyyy”)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.