Skip to main content
Announcements
Get Ready. A New Qlik Learning Experience is Coming February 17! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hour like filter

Hi everyone!

I need to use the date field as a filter, to choose a time within 24 hours that exists in a day, but when I put it in a box simple table when I print all rows.

hour.PNG

What can I do ??

thks.

1 Solution

Accepted Solutions
Not applicable
Author

8 Replies
sunny_talwar

but when I put it in a box simple table when I print all rows.

I don't understand this? Would you be able to elaborate?

Not applicable
Author

sorry man, the translator...

when I put the time in a list box this is repeated for each row there

sunny_talwar

Well, I guess each day has all the 24 hours so wouldn't you see the 24 hours for each day? Do you want to hide the list box for time when date is not selected?

Not applicable
Author

I want you to show me a single value for each hour for use as a filter as are the filter day, month and year.

sunny_talwar

May be create a field in the script like this:

Time(Hour(TimeStamp), 'hh TT') as Hora

Time(Floor(Frac(TimeStampField), 1/24), 'hh TT') as Hora

swuehl
MVP
MVP

Seems like you have formatted the value as 'hh TT', but keeping the underlying numeric value including minutes, seconds etc.

try either

Hour(TIMESTAMPFIELD) as HORA

to create a 24h based values or

Time#(Time(TIMESTAMPFIELD,'hh TT'),'hh TT') as HORA

which should re-interpret the value from the formatted output and set the numeric representation accordingly.

Not applicable
Author

swuehl
MVP
MVP

Great!

How does your final statement look like?

If your request is resolved, then please close this thread.

Qlik Community Tip: Marking Replies as Correct or Helpful