cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

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

extracting month

Hello,

 

I have a column containing a timestamp in the following format:

Jan-01

Feb-01

 

How can I use formula to parse the month so that it would return:

Jan

Feb

 

I tried month(:Name("My-Column")) but it is giving me a red squiggly line. 

 

Thank you so much for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: extracting month

Your column is a character column, not a JMP numeric date column.  To create a column that has just the month part of the character string, use the formula

substr( :"Month-Year"n, 1, 3 );

The structure I used gives the same results as :Name("Month-Year), but the structure I used is the supported structure moving forward

 

P.S.  In the future when you provide an image of a data table, please provide the left hand panels of the data table.  They provide more detail about the columns.

table.PNG

 

Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: extracting month

Is the column you reference as "My-Column" a JMP numeric Date/time column? Attaching a sample of the data would really help. Or even an image of the table
Jim
aprilmayjune
Level II

Re: extracting month

Here is a screenshot of the data table. Thank you for looking into this! @txnelson 

example.png

txnelson
Super User

Re: extracting month

Your column is a character column, not a JMP numeric date column.  To create a column that has just the month part of the character string, use the formula

substr( :"Month-Year"n, 1, 3 );

The structure I used gives the same results as :Name("Month-Year), but the structure I used is the supported structure moving forward

 

P.S.  In the future when you provide an image of a data table, please provide the left hand panels of the data table.  They provide more detail about the columns.

table.PNG

 

Jim

Recommended Articles