Forum Discussion
Time Format Boolean Column
- 4 years ago
I assumed your end time column was a Time column, but is it a DateTime? If so, you'll have to get the time component from it like this. You should consider splitting DateTime columns if not already.
7AM-10am =
VAR vTime =
TIME ( HOUR ( dilo_master[end_time] ), MINUTE ( dilo_master[end_time] ), SECOND ( dilo_master[end_time] ) )
RETURN
IF (
vTime >= TIME ( 7, 0, 0 )
&& vTime <= TIME ( 10, 0, 0 ),
TRUE (),
FALSE ()
)Pat
This has returned FALSE for every row. I have tried changing my end time column format between long and short time but this has not changed the output.
Thanks,
Elliot
I assumed your end time column was a Time column, but is it a DateTime? If so, you'll have to get the time component from it like this. You should consider splitting DateTime columns if not already.
7AM-10am =
VAR vTime =
TIME ( HOUR ( dilo_master[end_time] ), MINUTE ( dilo_master[end_time] ), SECOND ( dilo_master[end_time] ) )
RETURN
IF (
vTime >= TIME ( 7, 0, 0 )
&& vTime <= TIME ( 10, 0, 0 ),
TRUE (),
FALSE ()
)
Pat
- Anonymous4 years agoNot applicable
Thats perfect. Thank you!