- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Format Date Column
I am importing some sql data and it is bringing in the dates as data type Character and nominal model type (2017-11-01) and I am having an issue changing it to a workable date format such as (11/1/17). How do I reformat to this date type? I am attaching the data table for your review.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Format Date Column
Here is how to easily do what you want
1. Right click on the column header for pack_date and select Column Info
2. In the Column Info window, change the Data Type from Character to Numeric
3. Click on the down arrow for the format and go to Date and select "m/d/y"
4. Click on the down arrow for the Input Format and go to Date and select "y/m/d"
5. Click on OK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Format Date Column
Here is how to easily do what you want
1. Right click on the column header for pack_date and select Column Info
2. In the Column Info window, change the Data Type from Character to Numeric
3. Click on the down arrow for the format and go to Date and select "m/d/y"
4. Click on the down arrow for the Input Format and go to Date and select "y/m/d"
5. Click on OK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Format Date Column
Thanks for the quick response, worked perfectly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Format Date Column
how to copy the column property to into a script, I did exactly copy paste the script, but when I run the script, this pasted script doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Format Date Column
Here is the JSL
names default to here(1);
dt=current data table();
:pack_date << data type(numeric)<<informat("y/d/d")<<format("m/d/y");
and this is the JSL that JMP generated when I did the conversion interactively
names default to here(1);
// Change column info: pack_date
Data Table( "BallMillHistory" ):pack_date <<
Set Data Type(
Numeric,
Format( "y/m/d", 10 ),
Input Format( "y/m/d" ),
Format( "m/d/y", 12 )
) << Set Modeling Type( "None" );