Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have "Let" two date variables in the load script:
vMinOvertimeMonth 12/1/2020, 44166
vMaxOvertimeMonth 12/1/2021, 44531
To be sure they are really dates I check with these:
if(istext(vMinOvertimeMonth),'string','Date') returns Date
if(istext(vMaxOvertimeMonth),'string','Date') returns Date
The date format is: SET DateFormat='M/D/YYYY';
In a table the variables display as :
I am curious why the display is not consistent for the two variables.
Variables are created here:
MaxOvertimeMonth:
LOAD
max(DATE#(myDate,'MM/DD/YYYY')) as maxMnth
FROM [$(OVERTIME)] (qvd);
Let vMaxOvertimeMonth = peek('maxMnth',0,'MaxOvertimeMonth');
Let vMinOvertimeMonth = addyears(vMaxOvertimeMonth,-1);
It would be nice if there is a way to force QS to evaluate the date part (string or number) you want to be working with:
vMinOvertimeMonth.string() or vMinOvertimeMonth.num()