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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
richard_chilvers
Specialist
Specialist

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

1 Solution

Accepted Solutions
Not applicable

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

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

richard_chilvers
Specialist
Specialist
Author

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

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

good luck!