cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
SamKing
Level III

Character Date to numeric date

I apologize because I see this question asked in other ways before but I can't seem to follow the solutions. Perhaps my date format is different enough and I'm not keen enough on scripting yet to figure out where I'm going wrong. I'm using JMP 17.

I've attached a simple table where you will see a column of Dates that looks like a correct format but JMP only recognizes it as character. I can change to numeric but when attempt to make it a m/d/y h:m type format then it reverts back to character.  As a result I cannot get the column to sort properly.

How do I script this to modify from char to numeric m/d/y h:m type format?

1 ACCEPTED SOLUTION

Accepted Solutions
Thierry_S
Super User

Re: Character Date to numeric date

Hi,

You are on the right track. 

1) Specify the data type as Numerical and the Modeling type as Continuous

2) Set the desired appearance format as Time (e.g., m/d/y h:m:s)

3) Check that the Input Format is set to m/d/y h:m:s

 

Although the dates will appear in a formatted string (see step 2), you will be able to calculate differences using the "date_difference" formula and plot these values as a genuine time scale.

 

Note: however, if you want the raw time/date code, simply change step 2 to Best Fit

 

Best,

 

TS

Thierry R. Sornasse

View solution in original post

2 REPLIES 2
Thierry_S
Super User

Re: Character Date to numeric date

Hi,

You are on the right track. 

1) Specify the data type as Numerical and the Modeling type as Continuous

2) Set the desired appearance format as Time (e.g., m/d/y h:m:s)

3) Check that the Input Format is set to m/d/y h:m:s

 

Although the dates will appear in a formatted string (see step 2), you will be able to calculate differences using the "date_difference" formula and plot these values as a genuine time scale.

 

Note: however, if you want the raw time/date code, simply change step 2 to Best Fit

 

Best,

 

TS

Thierry R. Sornasse
pmroz
Super User

Re: Character Date to numeric date

Just wanted to confirm Thierry's approach.  Make sure you include the seconds in the format.

pmroz_0-1703871458250.png