string - How do I convert month names to int? -
I have a month name in a stored procedure, which gives me a reference in the month of the string name (e.g. January, February , March etc.)
I would like to convert it to an integer.
Is it possible without using many selected case statements?
I want to do this in .NET 3.5
You can use .Parse and then can get the month property of the date:
string mathnnam = "jan"; Date time.ppers (string.format ("{0} 1, 2000", month name)). Month
Comments
Post a Comment