I have two SQL DATETIME’s that I need to compare. I need to set the value of a column to be the more recent date between the two. Is there a function for this?
Share
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.
What I ended up doing was
I ended up doing this because if one of the dates was null, then the compare wouldn’t work correctly. So I used COALESCE with a date in the past that I knew would be a good baseline, then did my comparison. Thanks for your help everyone!