BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
d6k5d3
Pyrite | Level 9

I have a dataset as the one below:

 

Date           Day      Time       yyy   zzz

3/17/2009   Fri        9:00:00    12    34

5/18/2013   Fri        10:00:00  23    34

7/21/2007   Fri        11:45:00  45    56

…..……………………………..

 

Now, I would like to filter data with Time. The Time is in NUM time20. format. I would like to do this:

 

if day is FRI and time between 9:00:00 and 11:00:00 then ssss=aa;

 

I coded as: if day="Fri" and 9:00:00<Time<11:00:00 then ssss=aa; which gives an error and asks for arithmetic operator.

 

I need your help!

 

Much thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20

try

if day="Fri" and '9:00:00't<Time<'11:00:00't then ssss=aa;

this assumes aa is variable name

View solution in original post

4 REPLIES 4
novinosrin
Tourmaline | Level 20

try

if day="Fri" and '9:00:00't<Time<'11:00:00't then ssss=aa;

this assumes aa is variable name

PGStats
Opal | Level 21

You were close, you must use time literals :

 

 if day="Fri" and '9:00:00't<Time<'11:00:00't then ssss=aa;

PG
novinosrin
Tourmaline | Level 20

@PGStats  Sir, it's nothing to hide that I adore you, but we seem to have a great connection. 🙂 like last night. 

PGStats
Opal | Level 21

Cheers! Smiley Wink

PG