Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with date values not matching (decimals)

I have this variable in the load script:

 

Let vLoadDate = Date(Now(),'M/D/YYYY');

In a table expression I'm trying to compare vLoadDate to QuarterEnd(vLoadDate).  However, when comparing them today, March 31 (end of quarter), it says they are not equal.  When I look at the values (as a date), they both show 3/31/14.  However, when I look as numbers, one shows 41729.370659722 and the other is 41729.99999988.

How can I get them as absolutes so they'll match?  I tried using the fabs function, but either it didn't work or I didn't use it correctly.

Thanks,   Dan

1 Solution

Accepted Solutions
maxgro
MVP
MVP

you can use floor function

1.png

View solution in original post

3 Replies
maxgro
MVP
MVP

you can use floor function

1.png

MarcoWedel

QuarterEnd returns the last millisecond in the Quarter, meaning 23:59:59.999 at the last day in the quarter.

The suggested floor function cuts off the decimal places of the corresponding numerical value, meaning 00:00:00.000 at the last day in the quarter.

regards

Marco

Not applicable
Author

Thanks, that worked great.