Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

October 2, 2011

Sql Convert Month Name to Number

Below is sql code to convert Month Name to Number ex.
January to 1


DATEPART(mm,CAST('MonthName'+ ' 1900' AS DATETIME))