Work around for calculating age using the SQL Server DateDiff function

Posted on SQL Server Central See other posts from SQL Server Central
Published on Wed, 23 May 2012 06:00:00 UT Indexed on 2012/06/01 22:47 UTC
Read the original article Hit count: 220

Filed under:

Have you ever wanted to compute age, but the results from the DATEDIFF function seemed to be wrong some of the time? This tip covers why the DATEDIFF function does not always reliably compute age.

SQL Monitor New! SQL Monitor 3.0
Red Gate's multi-server performance monitoring
and alerting tool gets results from Day One.
Simple to install and easy to use –
download a free trial today.

© SQL Server Central or respective owner