Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlikandlearn
Contributor III
Contributor III

Date(Today())-1 returns 44146 and DATE(WEEKSTART(Today()) - 4,'M/D/YYYY'))-3 returns 44135 instead of date format

Hi,

I'm trying to compare the data based on the date condition in where clause, I've used DATE(WEEKSTART(Today()) - 4,'M/D/YYYY'))-3, but it returns 44137 instead of 11/2/2020

Any idea why it is returning number?

 

Thanks in advance.

 

Labels (2)
1 Reply
MayilVahanan

Hi @Qlikandlearn 

DATE(WEEKSTART(Today()) - 4,'M/D/YYYY'))-3 <-- After date format, you are subtracting with number (-3), so its gives number instead of dateformat. Each date has number format.
So instead of above, 
try with 

DATE(WEEKSTART(Today()) - 4,'M/D/YYYY'))-3 --> =DATE(WEEKSTART(Today()) - 7,'M/D/YYYY')

Date(Today())-1 --> =Date(Today()-1)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.