Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Start date and End date

Dear All

1. i was using slider with multiple option for choosing range , but now user wanted two seprate field as start date and end date

2. whenever i am changing slider into calendar object  year is coming wrong ?

As i can not share data as per company policy i am just adding two fields enlosed with query.

Thanks in advance

Regards

Pramod Kumar

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Pramod,

Did you check this application? I'm using two slider objects that populates two variables (from and to date) and a master calendar with different date fields, that can be easily modified to add different date formats.

Hope that helps.

Miguel

View solution in original post

4 Replies
Not applicable
Author

Hi Pramod,Please try to make to variable using min (Date) and Max(Date)  and name it todate and from date .

Then  try to use date# or date function to show ur data properly in variable.Come to front end and select Slider/calander as ur Qlikview object and choose todate ad from date variable here using slider or calander option.Also you can set max  date range for to and from date.

Regards,

Dushyant

Not applicable
Author

Hi Pramod,

     You can go to the number tab by right clicking on the calendar/slider object and by ticking the checkbox of override document settings , and clicking on radio button of Date , you can set the date format that you want.

Also the way dushyant suggested will work too .

Miguel_Angel_Baeyens

Hi Pramod,

Did you check this application? I'm using two slider objects that populates two variables (from and to date) and a master calendar with different date fields, that can be easily modified to add different date formats.

Hope that helps.

Miguel

Not applicable
Author

I have added this macro for selction from and to dates

:----*************************************************************

sub DataBetweenSelectedDate 'Used with the Variables , it filter the reports for two selected dates

set FD = ActiveDocument.Variables("From Date") '' variable for Initial date
FrmDtt=(FD.GetContent.String)

FrmDate=">=" & Day(FrmDtt) & "/" & month(FrmDtt) & "/" & year(FrmDtt)

set TD = ActiveDocument.Variables("To Date")
ToDtt=(TD.GetContent.String)

ToDate="<=" & Day(ToDtt) & "/" & month(ToDtt) & "/" & year(ToDtt)


if FrmDtt>ToDtt then
msgbox "Select Proper Date"
else
ActiveDocument.Fields("CommonDate").Select FrmDate   &  ToDate
end if
end sub

**************************************

but the problem is that , i am getting data of  00 Hrs , but i wanted daa till 11:59 of the TO Date day .

Regards

Pramod Kumar