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
Feli
Level IV

Syntax of Datetime in condition statements

I'm quite sure there is a really simple solution for my problem but even after searching the community and the scripting index I am stuck.

 

I want to access all rows before a certain date in my time column, e.g. :Timestamp < "25/06/2020 12:00:00 PM"

 

What is the correct syntax for putting a datetime into a condition?

 

I've seen it in the data filter with the numeric JMP date time format, but I haven't found a function for parsing a datetime into JMP date time yet.

I guess the informat() function might help, but how do I specify JMP date time?

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Perkinson
Community Manager Community Manager

Re: Syntax of Datetime in condition statements

Representing date, datetime and time contants in JSL requires you to specify them in a specific format. For dates, you must specify them in ddMONyyyy format, and for times, you must use dd:hh:mm:ss format. For example: 

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

Learn more: Using dates, times, datetimes and durations in JMP 

-Jeff

View solution in original post

1 REPLY 1
Jeff_Perkinson
Community Manager Community Manager

Re: Syntax of Datetime in condition statements

Representing date, datetime and time contants in JSL requires you to specify them in a specific format. For dates, you must specify them in ddMONyyyy format, and for times, you must use dd:hh:mm:ss format. For example: 

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

Learn more: Using dates, times, datetimes and durations in JMP 

-Jeff

Recommended Articles