I receive data in excel with Date columns in various format (defined as character)
Feb 31 2015
and many more..
Trying in excel to format them but does not work for excel import wizard (mac)
How will I convert them to one valid Date Column in JMP?
Thank you in advance for your support.
I have also struggled with date formats importing to JMP. What I do is this: In Excel, I format my date column as "short date", i.e, 6/23/15. Then, after importing the spreadsheet into a JMP data sheet, I then double click at the top of the date column and change the data type to Numeric and then change the modeling type to "Continuous". Next click "Input Format" and click "Date" in the drop down menu. You can then select the date format you wish to see in your JMP data table.
Looking at my example and ron_horne's example... they are basically the same concept... Use the informal() function.
The part that I didn't know, that the video indicates, is that if you leave out the second option of the informat() function, usually informal(<striing column>, <string format>), it will actually do that same thing as what I was proposing, but with a lot less coding.
So, make a function in your data table that contains "Informat(<date column>)" and it should have you set.
Please be sure to mark ron_horne's answer as the correct one if that helps you out as it is the more elegant of the two solutions.
Thank you for all the input!
After trying several weird character date formats imported as character through excel import wizard (mac), the informat function with deleting the secondary argument can handle most of the process (12 of 14 different char formats).
Once again many thanks to JMP community!
One of the two char formats which informat function is unable to resolve is as screenshotted.
The function can resolve only the month of "May", I guess because it is the only 3 char month as its own and equals to abbreviated month char.
Recoding all months except May or Finding and Replacing all months to 3 char abbr. ones would be a solution of course but none of them would be that "elegant".
Any idea would be appreciated:
Two options off the top of my head. Use the Recode Utility to change them all at once. Or you could use the nested Informat() arguments I proposed. You could build in a Match() argument into the logic to translate the long form month names into something JMP expects.
Sent from my iPhone
I'm talking out of turn here. If this is a one-time conversion, then sometimes it is easier to write VBA macros to get the data in the source to conform to some standard before exporting and then importing into JMP. YMMV.