Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

TimeStamp

Hiya Folks.

I have a problem that has been racking my brains for the last while so if anyone could help I'd appreciate it a lot. I've created a few list boxes that can show me the data for a certain time period (a list box for each year/month/day)

What i want to do is also create a list box that would show me the data for a certain time period during the day. ie shifts in a company, so from 9am to 5pm or 5pm to 12am.

The times dont really make a difference, they're only an example. I just want to be able to choose from my list box 1 of 2 shift periods.

Thanks in advance,
Barry

3 Replies
johnw
Champion III
Champion III

So do you want this list box?

Time Period
9am to 5pm
5pm to 12am

Or two list boxes, each with all of the times in that specific period?

9am to 5pm 5pm to 12am
9:32 am 7:20 pm
9:37 am 9:30 pm
10:01 am 10:40 pm
4:55 pm

For the first, just add a Time Period field in your script. For the second, create a list box, title it 9am to 5pm, for the field select <Expression>, and enter expression if(Time >= time#('0900','hhmm') and Time <= time#('1700','hhmm),Time). Do the same for the other period.

Or was it something else you wanted?

Not applicable
Author

HI there,

Thanks for the quick response. It was the first option I wanted. So I've added a SET timeperiod(day;night)

to my script.

This represents a day shift or night shift. When I create a list box though, how do I activate that new field so i see

it in the list box,

Sorry I'm a newbie! thanks

Not applicable
Author

sorry thats a stupid question i've figured it out.

thanks again for your help