Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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],
Your syntax is mostly right, just change it to: If(date#('01/11/2010','DD/MM/YYYY') - [ACW LAST Requal Date] etc.
Hi, my version is with makedate()
If(makedate(2010,11,1) -[ACW Last Requal Date .........
By the way, it seems you are trying to generate "years of something" (LOL xD), maybe you can use an intervalmatch() instead of nested if's
Rgds