BookmarkSubscribe
Choose Language Hide Translation Bar
Highlighted
twillkickers
Community Trekker

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?

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Staff (Retired)

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
Staff (Retired)

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