I could do a long switch but I want a more dynamic way to do it.
I would like to convert “jan” to “january”
“feb” “february” etc.
Hi,
How about the following expression?
DateTime.ParseExact(yourString,"MMM",System.Globalization.CultureInfo.InvariantCulture).ToString("MMMM")
Regards,
2 Likes
One of many options:
System.Globalization.CultureInfo.InvariantCulture.DateTimeFormat.MonthNames.First(Function (x) x.ToUpper.startsWith(YourVar.ToUpper))
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.

