Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to show dates between start date and end date. I'm using variables to store start date and end date as,
VStartDate = ONLY({<charge_session= {"$(=GetFieldSelections(charge_session))"}>} expected_start_time)
VEndDate = ONLY({<charge_session= {"$(=GetFieldSelections(charge_session))"}>} expected_end_time)
it is giving values correctly when I'm printing with $(VStartDate). but when I am using these variables in
if(DateTime >= $(VStartDate) and DateTime <= $(VEndDate),DateTime) it is giving - . what is wrong in this statement? How can I show data between start date and end date.
Any suggestion would be helpful.
Thanks.
Hi @VaishnaviMogal2,
It seems that the issue might be related to the format of the dates.
LET VStartDate = ONLY({<charge_session= {"$(=GetFieldSelections(charge_session))"}>} expected_start_time);
LET VEndDate = ONLY({<charge_session= {"$(=GetFieldSelections(charge_session))"}>} expected_end_time);
if(
DateTime >= Date#($(VStartDate), 'YourDateFormat')
and DateTime <= Date#($(VEndDate), 'YourDateFormat'),
DateTime
)
Replace 'YourDateFormat' with the actual format of your dates, such as 'MM/DD/YYYY' or 'YYYY-MM-DD'.
Hi Check this.
https://community.qlik.com/t5/QlikView-App-Dev/From-Date-and-To-Date/td-p/1787544
Still the issue is not resolved. 😢