c# - Convert a string containing monthName to Int of MonthDigit -


i have string has short month name in it.\

string month = "jun"; 

i need month in digit month name.

say this:

int monthindigit = getmonth(month);  monthindigit <-- 6 

how can achieve this. if cant question pleases comment explain proprly.

thanxx in advance

int monthindigit = datetime.parseexact(month, "mmm", cultureinfo.invariantculture).month; 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

debian - 500 Error upon login into Plesk Admin - auth.php3? -