Convert Monthname to Month number:
string strMonthName = "January";
DateTime.ParseExact(strMonthName, "MMMM", CultureInfo.CurrentCulture).Month;
Convert MonthNumber to Monthname:
CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1);
string strMonthName = "January";
DateTime.ParseExact(strMonthName, "MMMM", CultureInfo.CurrentCulture).Month;
Convert MonthNumber to Monthname:
CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1);
No comments:
Post a Comment