Datum: Datumstyp, Modellierungstyp und -format -> So beheben Sie MMM / JJJJDaten im Format MMM / JJJJ (001/2019, 002/2019, ... 012/2019) werden als Datumstyp importiert Charakter , Modellierungsart Nominal .
Ich versuche, dass JMP dies als Datum erkennt. Das endgültige Format ist nicht per se importierbar. Ich zeige ein Format nur als Beispiel.
Ich habe zwei Möglichkeiten ausprobiert, um das Problem ohne Erfolg zu beheben. Der Spaltenname lautet "MMM / JJJJ".
[nicht # 1]
names default to here(1);
dt = current data table();
dt<< column(:"MMM/YYYY",Numeric,Continous,Format( "m/d/y", 10));
[nicht # 2]
names default to here(1);
dt = current data table();
:"MMM/YYYY"() << Date Type(Numeric) << Modeling Type(Continous) <<FORMAT></FORMAT>
Betreff: Datum: Datumstyp, Modellierungstyp und -format -> So beheben Sie MMM / JJJJDas folgende Skript demonstriert das einfach Informat () funktioniert, oder Sie können die führende Null abstreifen und verwenden 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" ) )
);
Betreff: Datum: Datumstyp, Modellierungstyp und -format -> So beheben Sie MMM / JJJJDieser Code funktioniert, aber es scheint, dass es einen einfacheren Weg geben sollte.
//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 );
