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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Lisa_P
Employee
Employee

Re: Problem with if statement

The problem is that even thought he presentation is an integer, this is still a timestamp, so if you add the hour function, you convert it to an integer..

=if(hour <= hour(Date(Now(),'hh')), hour, NULL())

Labels (1)
2 Replies
bsocks_11415
Contributor
Contributor

Yes, that did it! I had tried using =if(hour <= Num(Date(Now(),'hh')), hour, NULL()) to convert it to a integer but wasn't getting any useful results. Didn't think to convert using hour(). Thank you!

MayilVahanan
MVP
MVP

hi

FYI: Simply, you can use hour function instead of hour(Date(Now(),'hh'))

=hour(Now())

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.