DATA Step, Macro, Functions and more

Applying filter in TIME variable.

Reply
New Contributor
Posts: 3

Applying filter in TIME variable.

Hello,

 

I'm trying to extract the data by applying filter between 8AM to 6PM in data set. Time variable is in TIME format. Any suggestions please?

 

Thanks in advance

Cnu

Super User
Posts: 2,049

Re: Applying filter in TIME variable.

Posted in reply to pappusrini
where time between '8:00't and '6:00pm't;
Super User
Posts: 23,980

Re: Applying filter in TIME variable.

Posted in reply to pappusrini

Where time between ‘06:00’t and ‘18:00’t;

 

Note the t after the time to indicate a time value.

 

New Contributor
Posts: 3

Re: Applying filter in TIME variable.

Posted in reply to pappusrini
Thanks. Does it matter if the time variable is the “time part” of date/time variable?

I have the time variable as:

8Am
9Am

But this is the time part of date/time variable.

Thanks
Super User
Posts: 23,980

Re: Applying filter in TIME variable.

Posted in reply to pappusrini

@pappusrini wrote:
Thanks. Does it matter if the time variable is the “time part” of date/time variable?

I have the time variable as:

8Am
9Am

But this is the time part of date/time variable.

Thanks

Try it. 

Ask a Question
Discussion stats
  • 4 replies
  • 91 views
  • 0 likes
  • 3 in conversation