Hello,
I am working on a data table in which the date is formatted as such: 15/09/08/19:12 .
I have managed to convert this using the custom format feature in the data table editor with the following: <YY>/<MM>/<DD>/<hh24><::><mm> but via script I cannot figure how to get this to work.
Below is an exert of the script, any help would be greatly appreciated.
Best Regards,
Luke
path = Get Default Directory();
dt = Pick File("Select .csv file with data", path, {"Excel|csv;xlsx;xls", "JMP Files|jmp;jsl;jrn", "All Files|*"}, 1, 0, "");
Open(dt,
columns(
New Column( "; DateTime", Numeric, "Continuous", Format( "y/m/d h:m"),Input Format( "<YY>/<MM>/<DD>/<hh24><::><mm>", 3 )),
New Column( "Machine ID", Character, "Nominal" ),
New Column( "Z/Xrmv_max", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "Z/Xrmv_min", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "Z/Xrmv_max-min", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "P/Xrmv_max", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "P/Xrmv_min", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "P/Xrmv_max-min", Numeric, "Continuous", Format( "Best", 12 ) )
),
Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Comma, CSV( 1 ) ),
Strip Quotes( 0 ),
Use Apostrophe as Quotation Mark( 0 ),
Use Regional Settings( 0 ),
Scan Whole File( 1 ),
Treat empty columns as numeric( 0 ),
CompressNumericColumns( 0 ),
CompressCharacterColumns( 0 ),
CompressAllowListCheck( 0 ),
Labels( 1 ),
Column Names Start( 1 ),
Data Starts( 2 ),
Lines To Read( "All" ),
Year Rule( "20xx" )
)
);
JMP
~ Luke :)