Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
TeodoraBurlica
Partner - Contributor III
Partner - Contributor III

Time range

Hi, 

I have to add time range to an app, but I also have to keep the date picker. For example:  from 14.02.2022 15:30 to 20.02.2022 8:00. I need some selections to change the whole dashboard, like date picker does. Any idea?

Thank you!

Labels (1)
1 Solution

Accepted Solutions
Andrei_Cusnir
Specialist
Specialist

Hello,

 

What essentially Date picker does is picking all the values from the dataset that are within the selected range.

 

There is not any native extension that can do the same thing for times, however you can use a combination of Date picker for dates and then Filter pane for times. For example:

 

NOTE: The following example is provided under the assumption that you have one field with the data like: "20.02.2022 8:00"


1. In Data load editor split the DateTime field string into 2 fields. One field will be the date and the other one will be the times:
LOAD
   Maketime(Hour(Time("DateTime ",'hh:mm:ss')),Minute(Time("DateTime ",'hh:mm:ss')),Second(Time("DateTime ",'hh:mm:ss'))) as Time,
   Date#(Date(DateTime , 'MM/DD/YYYY'), 'MM/DD/YYYY') as Date,
   Value as Value
FROM [...]
(...);

 

2. This will give you the following dataset:


 

As you can see the initial DateTime was MM/DD/YYYY HH:MM:SS and now we have the field Date for all the date values and the field Time for all the corresponding times values. 

 

3. Now you can create an Date picker object with the Date as dimension and Filter pane with Time for dimension.

 

4. You can filter the values with Date picker:

 

5. Then you can filter the times in Filter pane:

 

As you can see, I have used the expression ">08:00:00 AM<11:00:00 AM" to limit the options for the times that I need

 

6. After applying the selections:

 

You will get the dates filtered and the times filtered in the entire app.

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members. 

 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂

View solution in original post

1 Reply
Andrei_Cusnir
Specialist
Specialist

Hello,

 

What essentially Date picker does is picking all the values from the dataset that are within the selected range.

 

There is not any native extension that can do the same thing for times, however you can use a combination of Date picker for dates and then Filter pane for times. For example:

 

NOTE: The following example is provided under the assumption that you have one field with the data like: "20.02.2022 8:00"


1. In Data load editor split the DateTime field string into 2 fields. One field will be the date and the other one will be the times:
LOAD
   Maketime(Hour(Time("DateTime ",'hh:mm:ss')),Minute(Time("DateTime ",'hh:mm:ss')),Second(Time("DateTime ",'hh:mm:ss'))) as Time,
   Date#(Date(DateTime , 'MM/DD/YYYY'), 'MM/DD/YYYY') as Date,
   Value as Value
FROM [...]
(...);

 

2. This will give you the following dataset:


 

As you can see the initial DateTime was MM/DD/YYYY HH:MM:SS and now we have the field Date for all the date values and the field Time for all the corresponding times values. 

 

3. Now you can create an Date picker object with the Date as dimension and Filter pane with Time for dimension.

 

4. You can filter the values with Date picker:

 

5. Then you can filter the times in Filter pane:

 

As you can see, I have used the expression ">08:00:00 AM<11:00:00 AM" to limit the options for the times that I need

 

6. After applying the selections:

 

You will get the dates filtered and the times filtered in the entire app.

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members. 

 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂