cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

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

Create m/y column from separate character month and year columns

How do I create a date column with format yyyymm or m/y from two character columns entitled Month and Year?  This data is imported from city water billing system as a text file. See attached example.  I know how to concatenate the columns into another character column, but we will need the output column formatted as a date column to perform frequency calculations.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Create m/y column from separate character month and year columns

JMP stores dates as the number of seconds since January 1, 1904. As such, you must supply a day, you just don't need to display it or use it.

 

I noticed that you had your month and year columns listed as character strings. They probably should be numeric, but this formula will work with them as character string:

Dan_Obermiller_0-1629242766046.png

Notice that the Date MDY function requires the numeric Month, numeric Day, and numeric Year values to be entered. I used the first day of each month as the default. Then use the column info on this new column to set the format to be numeric, and the format of m/y. I have attached the new table with the formula in it.

 

Dan Obermiller

View solution in original post

2 REPLIES 2

Re: Create m/y column from separate character month and year columns

JMP stores dates as the number of seconds since January 1, 1904. As such, you must supply a day, you just don't need to display it or use it.

 

I noticed that you had your month and year columns listed as character strings. They probably should be numeric, but this formula will work with them as character string:

Dan_Obermiller_0-1629242766046.png

Notice that the Date MDY function requires the numeric Month, numeric Day, and numeric Year values to be entered. I used the first day of each month as the default. Then use the column info on this new column to set the format to be numeric, and the format of m/y. I have attached the new table with the formula in it.

 

Dan Obermiller
Dukowitz62
Level II

Re: Create m/y column from separate character month and year columns

That makes perfect sense.  Thank you for your response.

Recommended Articles