- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Scripting Data Type- date properties with non-conforming format
I'm struggling with changing this column property to a numerical continuous date. I know it's not a standard format, since it is in yymmdd and not yyyymmdd or m/d/y. Here is one of the many variations of the JSL I have tried to use that doesn't work. Is there another way?
Data Table("XYZData"):Date1 of MFG << Set Data Type(Numeric, Format( "y/m/d", 10 ), Input Format( "yymmdd" );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Scripting Data Type- date properties with non-conforming format
Input Format( "Format Pattern", "<YY><MM><DD>" )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Scripting Data Type- date properties with non-conforming format
Format Pattern is usually the best option to format dates (and times) in JMP (in my opinion). You would do this most of the time interactively in JMP (sometimes this can be a bit annoying to get working or understand how it works though).
Starting point character nominal
Change to Numeric Continuous and change format (do not press Apply or OK yet)
Click set format pattern, set the format provided by @mmarchandFSLR
And then click OK (or apply first).
Next right click on the formatted column and select Copy Columns
New Column("Column 3",
Numeric,
"Continuous",
Format("yyyy-mm-dd", 12),
Input Format("Format Pattern", "<YY><MM><DD>"),
Set Selected
)
Or check enhanced log, this is better option in this case as you are modifying existing column
// Change column info: Column 3
Data Table("Untitled"):Column 3 << Set Data Type(
Numeric,
Format("Format Pattern", "<YY><MM><DD>", 6),
Input Format("Format Pattern", "<YY><MM><DD>"),
Format("yyyy-mm-dd", 12)
) << Set Modeling Type("Continuous");