cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
Onjai
Level III

JMP 15 date time format changes

Hi,

I upgraded to JMP15 recently and found that some of my scripts written in JMP14 did not work properly.  I found that this line did not work because of an unrecognized format:

New Column( "Date", Numeric, "Continuous", Format( "d/m/y h:m:s", 22, 0 ), Input Format( "d/m/y h:m:s", 0 ) ),

 

When I changed it to read:

New Column( "Date", Numeric, "Continuous", Format( "d-m-y h:m:s", 22, 0 ), Input Format( "d-m-y h:m:s", 0 ) ),

It worked.

 

I see that the "/" is not available as a separator in JMP 15.  Is this the new norm?  Why did SAS decide to change this?

Is there another way to format the "/" back into the string?

 

Thank you

Cheers

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: JMP 15 date time format changes

There seems to be a format specification mismatch.  You are specifying to use

Format( "y/m/d h:m:s", 22, 0 ),
	Input Format( "y/m/d h:m:s", 0 )

in your script, however, your data are not in that format

Date
22/10/2019 6:15:00 AM
22/10/2019 6:16:00 AM
22/10/2019 6:17:00 AM
22/10/2019 6:18:00 AM
22/10/2019 6:19:00 AM

The JSL will work if you change the Format and Informat to:

Format( "d/m/y h:m:s", 22, 0 ),
	Input Format( "d/m/y h:m:s", 0 )
Jim

View solution in original post

7 REPLIES 7
txnelson
Super User

Re: JMP 15 date time format changes

I have not been able to replicate your findings. Can you please specify what operating system you are using?
Jim

Re: JMP 15 date time format changes

Like @txnelson I was unable to reproduce this problem. Here is my attempt:

 

Screen Shot 2019-12-21 at 8.00.01 AM.png

 

This picture shows the Log. The format specified with forward slashes still works.

 

Screen Shot 2019-12-21 at 8.00.23 AM.png

 

The data table show that the column format specified the same way also works.

Onjai
Level III

Re: JMP 15 date time format changes

Hi,

I am using JMP 15 and O/S is Win 10 Pro - 64 bit.

Attaching a csv file and the JSL script.  I still receive the error when using the "/" placeholder.

 

Hope this helps.

Thank you.

Cheers

txnelson
Super User

Re: JMP 15 date time format changes

There seems to be a format specification mismatch.  You are specifying to use

Format( "y/m/d h:m:s", 22, 0 ),
	Input Format( "y/m/d h:m:s", 0 )

in your script, however, your data are not in that format

Date
22/10/2019 6:15:00 AM
22/10/2019 6:16:00 AM
22/10/2019 6:17:00 AM
22/10/2019 6:18:00 AM
22/10/2019 6:19:00 AM

The JSL will work if you change the Format and Informat to:

Format( "d/m/y h:m:s", 22, 0 ),
	Input Format( "d/m/y h:m:s", 0 )
Jim
Onjai
Level III

Re: JMP 15 date time format changes

Thank you Jim.

Still, it seems odd that the script works in JMP 14 with

y/m/d

I will continue as suggested.

 

Thank you and the JMP community for all of your help.

Cheers!

SteveTerry
Level III

Re: JMP 15 date time format changes

Hi @Onjai, I encountered a similar problem with Input Format (along with Format) and tracked it down to a System Preferences setting.  This wouldn't likely address the y/m/d vs d/m/y issue flagged by @txnelson, but may help you understand the dashes vs slashes behavior.

 

 

 

Onjai
Level III

Re: JMP 15 date time format changes

Thank you Steve.  Always nice to have more follow through on some of these.

Cheers.