Forum Discussion

RvdHeijden's avatar
RvdHeijden
Post Prodigy
9 years ago
Solved

Calculate the difference between 2 dates

I need your help guys.

 

It's a simple question and i hope the anwer is simple

 

I got dates formatted like 3-2-2017 08:00:00 and 3-2-2017 12:13:00 and i need the difference in minutes if that is possible

5 Replies

    • RvdHeijden's avatar
      RvdHeijden
      Post Prodigy

      Sean

      Another question because your formula works if both dates have values.

      The formula returns an error it seems if one of the 2 dates are empty.

       

      it states that in DATEDIFF function, the start date cannot be greater than the end date

       

      How should i edit the formula so that if one of the 2 dates are empty it returns a value like 'missing data' or something like that ?

      • Sean's avatar
        Sean
        Community Champion

        RvdHeijden


        RvdHeijden wrote:

        it states that in DATEDIFF function, the start date cannot be greater than the end date


         

        If you used my formula you should not be getting this error!

        See picture...

        if start before end +

        if end before start -

        If both are blank you get zero

        if either one is blank you get blank

        But no you can mix text and number data types in the same column!

        (meaning you can't get numbers when the data is there and then text when its not - but you will get blanks or zero)

         

         

        Hope this helps!

        Good Luck! :smileyhappy: