Hello everyone,
I have a question about converting String format to Datetime.
For example:
before (String) → "31 June 2021
After (Datetime) → Jun 31, 2021
Could you help me?
Hello everyone,
I have a question about converting String format to Datetime.
For example:
before (String) → "31 June 2021
After (Datetime) → Jun 31, 2021
Could you help me?
Checkout this
DateTime.ParseExact(String variable,"dd MMMM yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("MMM dd, yyyy")
Regards
Sudharsan
DateTime.ParseExact(“31 June 2021”,“dd MMMM yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“MMM dd, yyyy”)
the output is contains exception, can you help me to check the code above?
any idea for this case?
Just use the simple CDate expression
CDate("30 June 2021").ToString("MMM dd, yyyy")
Regards
Gokul
oh i see hahaha, i’m so sorry… oke the final result is if the date isn’t contains in a calendar year, that data cannot coverted
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.