I want to get a total days between 2 dates
Query
Select DATEDIFF(DAY, CONVERT(DATETIME, '01/01/2012', 103), CONVERT(DATETIME, '31/01/2012', 103))
The above query is showing 30 days, instead of 31
How to modify my query for 31 days
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.
If you want 31, probably what you are looking for is
Between 01.01 and 31.01 there is only 30 whole days.