cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • See how to use the JMP Marketplace – Free tools to expand JMP capabilities. Register. July 10, 2 pm 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