날짜 : 날짜 유형, 모델 유형 및 형식 -> MMM / YYYY 수정 방법MMM / YYYY 형식의 데이터 (001/2019, 002/2019, ... 012/2019)를 날짜 유형으로 가져옵니다. 캐릭터 , 모델링 유형 명사 같은 .
나는 이것을 JMP에게 날짜로 인식 시키려고 노력하고있다. 최종 형식은 가져 오기 자체가 아닙니다. 아래에 형식을 예제로 보여줍니다.
나는 행운을 비꼬는 두 가지 방법으로 스크립팅을 시도했다. 열 이름은 "MMM / YYYY"입니다.
[실패 # 1]
names default to here(1);
dt = current data table();
dt<< column(:"MMM/YYYY",Numeric,Continous,Format( "m/d/y", 10));
[실패 # 2]
names default to here(1);
dt = current data table();
:"MMM/YYYY"() << Date Type(Numeric) << Modeling Type(Continous) <<FORMAT></FORMAT>
날짜 : 날짜 유형, 모델 유형 및 형식 -> MMM / YYYY 수정 방법아래의 스크립트는 간단한 Informat () 작동 할 것입니다. 그렇지 않으면 선행 0을 벗겨 내고 사용할 수 있습니다. 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" ) )
);
날짜 : 날짜 유형, 모델 유형 및 형식 -> MMM / YYYY 수정 방법이 코드는 작동하지만 간단한 방법이 있어야합니다.
//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 );
