cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

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

Check if a date is within a specified date range

Is there a way in JSL to check if a given date and time is within a specified date range?

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

Re: Check if a date is within a specified date range

JMP's < operator can compare multiple values strung together:

date = 6aug2018;
if ( 1jan2018 < date < 1jan2019, "good", "bad");

"good"

 

If your data has missing values, you'll need to test for them. If statement blog.

 

update: here is an example, look for

target > now > target - In Hours( 100 )

about half way down. change the target to target = today()+100; to see the effect.

Craige

View solution in original post

1 REPLY 1
Craige_Hales
Super User

Re: Check if a date is within a specified date range

JMP's < operator can compare multiple values strung together:

date = 6aug2018;
if ( 1jan2018 < date < 1jan2019, "good", "bad");

"good"

 

If your data has missing values, you'll need to test for them. If statement blog.

 

update: here is an example, look for

target > now > target - In Hours( 100 )

about half way down. change the target to target = today()+100; to see the effect.

Craige

Recommended Articles