My data is like below
2010-11-09 13:20:02.000
I’d like to get date only. Which sql function will i use?
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.
My preference (because of its flexibility) is
DATEADD/DATEDIFF:It’s flexible, because you can use the same pattern to achieve other rounding effects. E.g. to get the first of the month, you can dateadd/datediff month rather than day. It can also be used to find, e.g. the end of the month for the given date, or the end of the month, 3 months from the given date.