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

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c++ - CryptStringToBinary API behavior -