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 to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

extracting month

aprilmayjune
Level II

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