Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello all, I am trying to create a date variable for the end of the year.
what i am trying to achieve is to use that end of year variable to filter my date field in my table to only retrieve data from current month till end of the year.
table:
load
aaaa,
bbbb,
datefield,
cccc
from cuz
where datefield <=variable;
need to get data for current month till end of the year.
thanks All.
As below
Let vCurrMonth = Date(MonthStart(today()),'YYY-MM-DD');
Let vYearEnd=
Date(YearEnd(today()),'YYY-MM-DD');
Load *
From yoursourcetable
Where DateField >='$(vCurrMonth)' AND DateField <='$(vYearEnd)'
Hello,
Perhaps you can do something like this:
let vEndYear = MonthEnd(MakeDate(Year(Today()), 12, 1));
Trace End of year: $(vEndYear);
Allow me to elaborate in detail:
The output is:
I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members.
As below
Let vCurrMonth = Date(MonthStart(today()),'YYY-MM-DD');
Let vYearEnd=
Date(YearEnd(today()),'YYY-MM-DD');
Load *
From yoursourcetable
Where DateField >='$(vCurrMonth)' AND DateField <='$(vYearEnd)'