CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: C#

c# function to Get Month Number From Abbreviation

209 Views
Copy Code Show/Hide Line Numbers
public string GetMonthNumberFromAbbreviation(string mmm)
{
string[] monthAbbrev =
CultureInfo.CurrentCulture.DateTimeFormat.AbbreviatedMonthNames;
int index = Array.IndexOf(monthAbbrev, mmm) + 1;
return index.ToString("0#");
}
by pandiyachendur
  June 30, 2010 @ 11:57pm
Tags:

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate