Forum Discussion
Anonymous
6 years agoNot applicable
Time Comparisons with NOW()
Hello, In a measure, I am trying to compare the time from NOW()to a static value using TIME(), but it is only working on the < condition. The function NOW() is returning 7/28/2020 11:18AM What...
MFelix
6 years agoSuper User
Hi Anonymous ,
I have use the same formulas and getting true and false as expected.
What version are you using, and is this a part of a bigger syntax?
Anonymous
6 years agoNot applicable
MFelix I am using Version 2.83 (July release) and It is part of a bigger syntax, but I'm testing only the time comparison component. Here is the full code that I am using right now:
Measure =
VAR cur_time = UTCNOW() - TIME(4, 0, 0) //Converts to EST
VAR Hold = OR(If(cur_time<TIME(3,30,0) && Dates[Days from Today]=-1, true, false),If(cur_time>=TIME(3,30,0) && Dates[Days from Today]=0, true, false)) //We only show the current day after 330p
return If(cur_time > Today() + TIME(3,30,0), true, false)
- MFelix6 years agoSuper User
Is the days from today a column or a measure?