Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Create Date Range values taking Current date as 12-jun-1999

Hi Community Members,

I have my Ivoice Date(billing date) and want to take current date as 12-jun-1986.When I select the Invocie date Listbox ,it should show the its range in the Receivables list box, by taking the currentdate as 12-jun-1999.I have written the following code ,but I am not getting any result and also any error, please help me out in this issue

If(Num#(Today())-Num#(INVOICE)>=0 and (Num#(Today())-Num#(INVOICE)<=30),'0-30 Days',

If(Num#(Today())-Num#(INVOICE)>=31 and (Num#(Today())-Num#(INVOICE)<=60),'31-60 Days',

If(Num#(Today())-Num#(INVOICE)>=60 and (Num#(Today())-Num#(INVOICE)<=90),'61-90 Days',

If(Num#(Today())-Num#(INVOICE)>=90 and (Num#(Today())-Num#(INVOICE)<=120),'91-120 Days',

If(Num#(Today())-Num#(INVOICE)>=120 and (Num#(Today())-Num#(INVOICE)<=150),'121-150 Days',

If(Num#(Today())-Num#(INVOICE)>=151 ,'Over 150')))))) as ReceivablesAge

FROM

[..\QVd's\txBilling.qvd]

(qvd);

Regards,

Ramesh

3 Replies
MayilVahanan

hi

use num() instead of num#()

Edit:

One question? num(today()) takes today value?? then why you use it?

this expression gives today - invoce date only..

if(Num(Today())-Num(INVOICE)>=0 and Num(Today())-Num(INVOICE)<=30,'0-30 Days',

If(Num(Today())-Num#(INVOICE)<=60,'31-60 Days',

If(Num(Today())-Num(INVOICE)<=90,'61-90 Days',

If(Num(Today())-Num(INVOICE)<=120,'91-120 Days',

If(Num(Today())-Num(INVOICE)<=150,'121-150 Days','Over 150'))))) as ReceivablesAge

Hope it helps


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

Hi Ramasamy,

its not working, and you are correct, today's date will take the systems today's date,

how to take the today's date as,12-jun-1999

Regards,

Ramesh

uttamdwibedy
Contributor
Contributor

Hi Ramesh,

I am hope you may accomplished your task defining a veriable(say vToday), set the value of the variable the date u required & replacewith the variable in the place where u used today().

....Uttam