Date change format

Please convert 11/04/2023 8:49AM date to Output as 20230411


when 11 is Month,
otherwiese DateTime.ParseExact method along with the parse format definition is recommended

1 Like

Hi @Kuldeep_Pandey

Try this

DateTime.ParseExact("11/04/2023 8:49AM","dd/MM/yyyy h:mmtt",system.Globalization.CultureInfo.InvariantCulture).ToString("yyyyMMdd")


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