cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use JMP Live to centralize and share reports within groups. Webinar with Q&A April 4, 2pm ET.
Choose Language Hide Translation Bar
View Original Published Thread

Changing data type from character to continuous with JSL

FN
FN
Level VI

I have a script that gets back the time as character. The format is correct but I want  to automate this change of data type automatically.

tsformat.jpg

How to do so in JSL scripting?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User


Re: Changing data type from character to continuous with JSL

From the screenshot you are displaying, it appears that whatever methodology you are using to generate the TS_UTC column, that it is being generated as a character column.  The following JSL will convert from your character column to a numeric, continuous column, with your desired display format.

names default to here(1);
dt=current data table();
dt:TS_UTC<<data type(numeric)<<modeling type(continuous)<<format("yyyy-mm-ddThh:mm:ss");
Jim

View solution in original post

1 REPLY 1
txnelson
Super User


Re: Changing data type from character to continuous with JSL

From the screenshot you are displaying, it appears that whatever methodology you are using to generate the TS_UTC column, that it is being generated as a character column.  The following JSL will convert from your character column to a numeric, continuous column, with your desired display format.

names default to here(1);
dt=current data table();
dt:TS_UTC<<data type(numeric)<<modeling type(continuous)<<format("yyyy-mm-ddThh:mm:ss");
Jim