Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
richard_chilvers
Valued Contributor

Time within 24 hours

Does anyone have any neat ways of dealing with data within a 24 hour time-frame?

My data is date/time stamped, and I would like to select the data for activity exactly within 24 hours of the reload date/time. This will of course overlap midnight.

This needs to be at chart expression level and I would be happy to deal in hours, rather than down to minutes/seconds.

I have a few ideas but they all seem rather clumsy, so any suggestions are welcome.

Thanks

Tags (4)
1 Solution

Accepted Solutions
Not applicable

Re: Time within 24 hours

Hi Richard,

use Now() for current timestamp, subtract your input timestamp (given it's a correct format) when the difference is <= 1 than within the last 24 hours.

Do your further processing in order to shape your Data model.

good luck

cheers

F

View solution in original post

3 Replies
Not applicable

Re: Time within 24 hours

Hi Richard,

use Now() for current timestamp, subtract your input timestamp (given it's a correct format) when the difference is <= 1 than within the last 24 hours.

Do your further processing in order to shape your Data model.

good luck

cheers

F

View solution in original post

richard_chilvers
Valued Contributor

Re: Time within 24 hours

Thanks Felix

The solutions I was trying were far to complicated and this is nice and simple. I'm assuming that if I want a 72 hour interval, I use <=3 instead?

Not applicable

Re: Time within 24 hours

yw, yep 1 is 24 = one day. The fractal is the part of the day which can easily put into hours etc...

good luck!