Calculating difference between date columns RRS feed

  • Question

  • - MOSS 2007 SP2

    Let's assume I have the following Date fields: [Start_date], [End_date], [Revised_end_date]

    I understand that I can easily calculate the difference between two date fields by using a calculted column with an expression of:


    But what if I want to only calculate between [Start_date] and [End_date] as long as [Revised_end_date] is null.  If not null, then I want the difference between [Start_date] and [Revised_end_date] (ideally in X Months, X Days format)

    Edit - To clarify, I am not very strong with building the expressions.  Any help or guidance on the correct expression to achieve this (even if it doesn't use DATEDIF) would be appreciated. 

    • Edited by Sephiroth0327 Tuesday, February 1, 2011 6:02 PM grammar
    Tuesday, February 1, 2011 5:57 PM


All replies