I'm loading a start date variable and Qlik is interpreting it as a decimal. Why is it doing that?
Variable: Let sdate = ‘01/01/2021’;
Result:
I'm also having trouble converting an ascii, text to a date format. Here are a couple of my attempts at converting from ascii, text to a date. Both convert it to a numeric,integer
Date(Date#(FLAT_DTE_EFF),'MM/DD/YYYY') as new_date
Date(Date#(FLAT_DTE_EFF,'MM/DD/YYYY'),'MM/DD/YYYY') as new_date1
Objective:
I would like to use a rangemax(new_date,$(sdate)) but my end result is a decimal and I can't seem to convert that to a valid date.
Your call of: $(sdate) creates a division of 1 / 1 / 2021. To let Qlik it's interpreting as date the variable needs to be wrapped with single-quotes like: '$(sdate)'.
More simple would be to create the variable in this way: