cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • See how to interactively organize and restructure data for analysis. Register for May 29 webinar, 2pm US ET.

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