How to Convert String(yyyy/mm/dd) To Date

Hi,

String = “20220808”. I want to convert this string to “08/08/2022”. Can anyone help?

grafik
DateTime.ParseExact(“20220808”,“yyyyMMdd”, System.Globalization.CUltureInfo.InvariantCulture)

1 Like

Thanks can you remove that timestamp, I need to enter only mm/dd/yyyy into a calendar select date ?

so you are interested on a particular formating (as we dont touch the internal structure of a datetime):


or swap the the Month and Day if it is needed in other order

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