Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I am generating dates with the below code
LET vMinDate=Num(MakeDate(2018,1,1));
let vMaxDate=Num(MakeDate(Year(today())+1,12,31));
Temp:
LOAD
Date($(vMinDate)+IterNo()-1) as TempDate
AutoGenerate(1)
While $(vMinDate)+IterNo()-1<=$(vMaxDate);
With the field TempDate, I got the dates from 01/01/2018 to 12/31/2019
I have an another field call as Festival, where there are list of holidays are listed
Festival:
left join(Temp)
Load * inline [
Holidays
01/01/2018
01/26/2018
02/14/2018
04/01/2018
];
(This is the sample table with list of holidays)
Now, I have to get a field called as Working days by separating the TempDate and Holidays
*****************************
I am trying to join the Temp table and Festival table and derive a table as
T3:
Load
TempDate,
Holidays,
Date((TempDate-Holidays), 'MM/DD/YYYY') as WorkingDays
Resident Temp;
But, I dont know why I am getting incorrect WorkingDays
I am not able to understand why the years are generating as 1899 and 1900.
Can any one help me!!!!!
Hi Parvez,
Because when you use "TempDate-Holidays", you will get a number,
the number means the number of days between the TempDate and Holidays.
eg. 2018-01-02 - 2018-01-01 = 1
Actually I'm not really sure what you want, but you can use the "difference" to get what you want.
Aiolos Zhao
Hope below is what you want:
Aiolos Zhao