Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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())

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

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.