Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
MVP
MVP

Re: Problem with date values not matching (decimals)

you can use floor function

1.png

3 Replies
MVP
MVP

Re: Problem with date values not matching (decimals)

you can use floor function

1.png

Re: Problem with date values not matching (decimals)

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

Re: Problem with date values not matching (decimals)

Thanks, that worked great.

Community Browser