3 Replies Latest reply: Mar 2, 2012 7:26 AM by Göran Hofstedt RSS

    Help with a If calculation

    Göran Hofstedt

      Hi

       

      I have two datefields and want the diffrens in between them. I do this by Stopdate - StartDate.

      But in some fields the StopDate are wrong. So I only want the calculation for the fields were Stopdate are larger then Startdate. I do the caluclation in the script as  Date(Date#(StopDate, 'YYYYMMDD'), 'YYYY-MM-DD') - Date(Date#(StartDate, 'YYYYMMDD'), 'YYYY-MM-DD') as DayDiff

       

      I guess I should use a IF statemeant, can anyone help me?

       

      Thanks!