How do you check if a date is within this or the prior calendar year.
I.E. December 31, This Year > myDate > January 1, Last Year
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.
The standard SQL way is to use EXTRACT:
Not all databases support these functions; but all do have a way of extracting the date somehow. For instance, many support the
yearfunction.