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
Post a Comment