가져 오는 동안 날짜 형식을 변경하십시오.안녕하세요 사람들!!
유럽 형식의 날짜 (dd-mm-yyyy)의 파일이 있고 파일 가져 오기 중에 jmp가 자동으로 미국식 형식으로 변환됩니다 (m / d / yy).
jmp 데이터 형식을 변경할 수 있습니까?
친애하는,
안토니
다시 : 가져 오는 동안 날짜 형식을 변경JMP 14가 이것을 할 수 있습니다. 미리보기 마법사를 사용하여 처음으로 파일을 열고 필요한 형식을 지정하십시오.
Specify a d-m-y format for a column열의 dmy 형식 지정
파일이 열리면 소스 스크립트를 마우스 오른쪽 버튼으로 클릭하고 편집하여 필요한 스크립트를 확인합니다.
Open(
"C:\Users\chales\Desktop\2col.txt",
columns(
New Column( "Col 2", Character, "Nominal" ),
New Column( "Col 3", Numeric, "Continuous", Format( "d/m/y", 10 ), Input Format( "d/m/y" ) )
),
Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Comma, CSV( 0 ) ),
Strip Quotes( 1 ),
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" )
)
)
Text data imported with format형식으로 가져온 텍스트 데이터
다시 : 가져 오는 동안 날짜 형식을 변경내 파일 형식이 .txt이고 JMP 14를 사용하고 있습니다.
이것은 내 대본의 일부입니다.
names default to here (1);
Clear Symbols();
filelist={}; //empty list
//ouvre une boite de dialogue retournant le chemin du fichier
prefilepath = Pick Directory( "Pick the Top Level Directory" );
If( Host is( Mac ),
filepath="/"||prefilepath,
filepath = Convert File Path( prefilepath, Windows )
);
prefilelist = Files In Directory( filepath, "recursive");
n2=nitems(prefilelist);
//Filtre sur les caractères spécifiées
For( i2 = 1, n2 >= i2, i2++,
file=(prefilelist[i2]);
If( Item( 2, prefilelist[i2], "." ) == "txt" | Item( 2, prefilelist[i2], "." ) == "csv" | Item( 2, prefilelist[i2], "." ) == "dat" & contains(prefilelist[i2],"LVL2") != 0,
Insert Into( filelist,file),
show(file)
)
);
//nombre d'objet dans filelist
nf=nitems(filelist);
For( iii = 1 , iii <= nf, iii++, //this starts the first loop
filenow = ( filelist[iii] );
fileopen=(filepath||filenow);
//dt=open(fileopen,private);
dt=open(fileopen, Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Tab, Other( ";" ), CSV( 0 ) ),//use ";" as a delimiter too
Strip Quotes( 1 ),
Use Apostrophe as Quotation Mark( 0 ),
Scan Whole File( 1 ),
Treat empty columns as numeric( 0 ),
CompressNumericColumns( 0 ),
CompressCharacterColumns( 0 ),
CompressAllowListCheck( 0 ),
Labels( 1 ),
Column Names Start(56),//starting on second row
Data Starts(57),//data starts on 3rd row
Lines To Read( "All" ),
Year Rule( "20xx" )
), private);//Import settings used in the open argument
New Column( "Source", Character, Nominal );
:Source << set each value( filenow );
//dt<<NEW column=""></NEW>
문안 인사,
앤서니
다시 : 가져 오는 동안 날짜 형식을 변경안녕 안토니,
가져올 파일 형식, 사용중인 JMP 버전 및 실행중인 운영 체제에 대한 자세한 정보가 필요하다고 생각합니다. support@jmp.com에서 JMP 기술 지원부에 문의하는 것이 더 나을 수도 있습니다.
문안 인사,
브라이언 코코 란
JMP 개발
다시 : 가져 오는 동안 날짜 형식을 변경 원하는 것을 달성하기 위해 사용할 수있는 세 가지 공식이 있습니다.
하나는 = EDATE (A1,48)이며 여기서 시작 날짜는 A1이며 48 개월을 원합니다.
두 번째는 = DATE (YEAR (A1), MONTH (A1) + 48, DAY (A1))이며 여기서 시작 날짜는 A1이므로 48 개월을 원합니다. 각각은 10/1/2022를 반환합니다.
9/30/2022 날짜를 얻으려면 = DATE (YEAR (A1), MONTH (A1) +2,0)을 사용하십시오.
이 날짜는 모두 정확하지만 마지막 수식을 사용할 수 있습니다.
이 주제 또는 기타 지원에 대한 추가 정보 데이터 복구 두바이.