cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Elby
Level I

Determine if time is between certain hours

Casual jmp 12 user

How do I have jmp determine if a time is between certain hours on any day?

I want to create a column to show (Y/N) if the time when data was taken is between 12:00 AM and 7:00 AM.  So the below data points would be Yes then No.

Data taken at random times and transferred into jmp as shown in the examples below.

 

    Data (Example)         Between 12 and 7? (Desired result)

11/11/2017 6:44 AM                          Y
11/12/2017 5:28 PM                          N

1 REPLY 1
uday_guntupalli
Level VIII

Re: Determine if time is between certain hours

@Elby
       

dt = Current Data Table(); 

dt << New Column("Check",Character,Nominal,Formula(If(Hour(:Data) >= 7 & Hour(:Data) <= 12,"Y","N")));
Best
Uday