Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Im trying to get todays data using Date(now()), i have also atempted with Today().
I get the data date through this: timestamp(Makedate(1970,1,1)+ mid(answeredAt,7,10) /24/60/60,'DD.MM.YYYY') as WorkDate
And i need to put it in the where condition i belive like this: WHERE timestamp(Makedate(1970,1,1)+ mid(answeredAt,7,10) /24/60/60,'DD.MM.YYYY') = Date(now());
However neither with date() nor Today() seems to read it, am i missing something?
Thank you, brg,
Ben
>= Today()-1, this worked to check if the date is bigger then today-1
If you want to use dates, you need to make sure that you have integers inside your date fields. For example,
Date(Now())
will not be an integer, since Now() returns a time with millisecond precision, and Date() just formats it as a date (without removing the fractional part). But if you instead write
Date(Floor(Now()))
or
Today()
you will get an integer formatted as a date.
So you will need to do this also for your calculated field based on "answeredAt".
>= Today()-1, this worked to check if the date is bigger then today-1
Changing the equality test to a greater-than test is also a good solution. The point is that you cannot use equality as a condition when comparing floats.
See https://community.qlik.com/t5/Design/Rounding-Errors/ba-p/1468808