2 Replies Latest reply: Dec 29, 2010 12:50 PM by Héctor Muñoz RSS

    How to add a DateDiff in the load script

    nstewart

      Hi

       

      Apologies, I'm a newbie to QV!!

       

      I'm trying to add a DateDiff field in the load script, as the piece of code below is giving me nulls,1,2 and3+ but nothing in the 3 group and I just want to see why.

       

      The DateDiff needed is a fixed date of 01-Nov-10 - {ACW Last Requal Date], would anyone be able to point me in the right direction please?

       

      Thanks

      Nic

       

      If(IsNull([ACW Last Requal Date]),'',

      If('01/11/2010'-[ACW Last Requal Date] < '366','1',

      If('01/11/2010'-[ACW Last Requal Date] < '731','2',

      If('01/11/2010'-[ACW Last Requal Date] < '1096','3',

      If('01/11/2010'-[ACW Last Requal Date] > '1095','+3'))))) AS [ACW Last Requal Year],