Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
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
Highlighted
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
Article Labels

    There are no labels assigned to this post.