Data: Tipo di data, Tipo di modello e Formato -> Come correggere MMM / YYYYI dati in formato MMM / YYYY (001/2019, 002/2019, ... 012/2019) vengono importati come tipo di data Personaggio , Tipo di modellazione Nominale .
Sto cercando di far riconoscere a JMP questa data come data. Il formato finale non è di per sé un'importazione. Ho mostrato un formato sotto solo come esempio.
Ho provato a scrivere due modi per risolvere senza fortuna. Il nome della colonna è "MMM / YYYY"
[fail # 1]
names default to here(1);
dt = current data table();
dt<< column(:"MMM/YYYY",Numeric,Continous,Format( "m/d/y", 10));
[fail # 2]
names default to here(1);
dt = current data table();
:"MMM/YYYY"() << Date Type(Numeric) << Modeling Type(Continous) <<FORMAT></FORMAT>
Ri: Data: Tipo di data, Tipo di modello e Formato -> Come risolvere MMM / YYYYLo script seguente dimostra che è semplice Informat () funzionerà o sarà possibile rimuovere lo zero iniziale e utilizzarlo Informat ().
New Column( "Date",
Numeric,
"Continuous",
Format( "m/y", 12 ),
Formula( Informat( Right( :Name("MMM/YYYY"), 8 ), "m/y" ) )
);
New Column( "Date2",
Numeric,
"Continuous",
Format( "m/y", 12 ),
Formula( Informat( :Name("MMM/YYYY") , "m/y" ) )
);
Ri: Data: Tipo di data, Tipo di modello e Formato -> Come risolvere MMM / YYYYQuesto codice funziona, ma sembra che ci dovrebbe essere un modo più semplice.
//Reformat MMM/YYYY (create new columns, create new Date, delete MMM/YYYY)
New Column( "Month",
Numeric,
"Nominal",
Format( "Best", 9 ),
Formula( Num( Substr( :Name( "MMM/YYYY" ), 2, 2 ) ) )
);
New Column( "Year",
Numeric,
"Nominal",
Format( "Best", 9 ),
Formula( Num( Substr( :Name( "MMM/YYYY" ), 5, 8 ) ) )
);
New Column( "Date",
Numeric,
"Continuous",
Format( "m/y", 12 ),
Input Format( "m/y" ),
Formula( Date MDY( :Month, 1, :Year ) )
);
//Moves new column to follow Product Line
:Date << Set Selected( 1 );
dt << Move Selected Column( after( "Product Line" ) );
:Date << Set Selected( 0 );
