Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Inna_Shnaiderman
Contributor III
Contributor III

From Date and To Date

I have on all Reports Calendar Date Range. I created it according to other posts. Unfortunately, on 'Date from'  it is working and 'Date to' is not impacting . A did all according to this post:

https://community.qlik.com/t5/QlikView-App-Dev/how-to-show-the-value-quot-from-date-quot-to-quot-to-...

But it is taking all dates 'from' and not not taking into consideraion' to'.

Labels (2)
6 Replies
Martijn_W
Contributor III
Contributor III

Hi,

I've reproduced the steps. I got it working in the attached example file. Feel free to compare the code. I did notice that you copied the entire format portion of the code in the explanation, while your date field is just a date format ( DD/MM/YYYY hh:mm:ss instead of just DD/MM/YYYY).

Hope this helps!

Martijn

Inna_Shnaiderman
Contributor III
Contributor III
Author

Hi, 

I tried this , it is not helping, for some reason Date_to is being showed in my model in selection as MM/DD/YYYY hh:mm:ss and the final selection is impacted only from Date_From. PSA. Can you please help how to get rid of this date format issue.

Martijn_W
Contributor III
Contributor III

Hi,

I recommend truncating the time portion if it's not needed. You can use:

dayname(floor(<datefield>)) as <datefield>

in your loadscript to accomplish this.

floor() will round the datefield down to a whole number, dayname() will convert the number back to a date.

Inna_Shnaiderman
Contributor III
Contributor III
Author

Hi,

I tried it , still it did not solve the issue, it is the same result.

Martijn_W
Contributor III
Contributor III

Can you share the code of the following items?:

- the calendar objects of both of the date ranges

- the code of the button (the search string input)

Also, does it work if you clear all the selections first?

Inna_Shnaiderman
Contributor III
Contributor III
Author

Hi,

Date From:

Min Value:

min({1} DD_Solution_Leg_PTD)

Max Value:

max({1} DD_Solution_Leg_PTD)

Variable: VPTDFROM

Date To:

Min Value:

min({1} DD_Solution_Leg_PTD)

Max Value:

max({1} DD_Solution_Leg_PTD)

Variable PTDTo

 

Apply Button:

='>=' & Date( VPTDFrom , 'MM/DD/YYYY') & '<=' & Date(VPTDTo, 'MM/DD/YYYY')

 

'Clear All' does not help in the beginning.

Thanks!