Home Forums SQL Server 2008 T-SQL (SS2K8) How the datediff determinines the difference between two dates? RE: How the datediff determinines the difference between two dates?

  • Jeff Moden (1/19/2015)


    Be advised that the "wk" DATEPART can change depending on language settings and DATEFIRST settings. It's not considered to be a good thing to use.

    +1

    I would calculate the difference in days and get the modulo of 7.

    (which might be a total different interpretation of difference in weeks)

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP