cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
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