cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
mlo1
Level IV

Time Stamp comparison formula

I have to create an annotation column which should be filled depending on timestamp range from Time1 till time2.
What is the correct jsl function to put into the formula to compare the given timestamps with the dates in the Time column?

If((2025-10-23 00:56:57) <= :Time <= (2025-10-26 10:56:57), "Step 1")

 

The Time column has the following format

TimeQuestion_2025-10-28 13_06_19-FAT1_log - JMP.png
I am using JMP19.0.0

2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: Time Stamp comparison formula

Can Time1 and Time2 be found from somewhere? If not, you can use following format directly

28Oct2025:14:25:08

Or use Informat() and define the format

-Jarmo

View solution in original post

txnelson
Super User

Re: Time Stamp comparison formula

Here is how I would handle it

If(informat("2025-10-23 00:56:57", "yyyy-mm-ddThh:mm:ss") <= :Time <= Informat("2025-10-26 10:56:57","yyyy-mm-ddThh:mm:ss"), "Step 1")
Jim

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Time Stamp comparison formula

Can Time1 and Time2 be found from somewhere? If not, you can use following format directly

28Oct2025:14:25:08

Or use Informat() and define the format

-Jarmo
txnelson
Super User

Re: Time Stamp comparison formula

Here is how I would handle it

If(informat("2025-10-23 00:56:57", "yyyy-mm-ddThh:mm:ss") <= :Time <= Informat("2025-10-26 10:56:57","yyyy-mm-ddThh:mm:ss"), "Step 1")
Jim
Jeff_Perkinson
Community Manager Community Manager

Re: Time Stamp comparison formula

time = 14:10:15;
date = 18Jan1957;
datetime = 11Jul2000:03:10:12; 



Lots of information, including information about date, time, and datetime constants in Using dates, times, datetimes and durations in JMP

-Jeff

Recommended Articles