cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP 19 is here! See the new features at jmp.com/new.
  • Due to global connectivity issues impacting AWS Services, users may experience unexpected errors while attempting to authorize JMP. Please try again later or contact support@jmp.com to be notified once all issues are resolved.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
FN
FN
Level VI

Changing data type from character to continuous with JSL

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

Recommended Articles