DATEDIFF Semester

Version 1

    Description:

     

    How to calculate the semester difference between 2 dates

     

     

     

    Example Calculation:

     

    //# 1 - Using DATEDIFF

    INT(DATEDIFF('quarter',start date,end date)/2)

     

     

    //# 2 - Using date calculation

     

    (YEAR(end date) - YEAR(start date))*2

    +

    (
         (IF MONTH(end date)>= 7 THEN 2 ELSE 1 END)

         -

         (IF MONTH(start date) >= 7 THEN 2 ELSE 1 END)

    )

     

     

    Related Functions:

    DATEDIFF

     

     

    Further Reading/Examples:

    DATEDIFF Semester