cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to use Accelerated Life Testing (ALT) to evaluate reliability. Register for June 5 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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

Recommended Articles