I have an integer column “Month”
I would like to get 2 digit number for month.
This is what I have tried: DATEPART(mm, @Date)
It returns one digit for months January to September
I am using SQL Server 2008
Anyone has suggestion?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
there are different ways of doing it
like
like
see Fiddle
There may be other ways to get this.