안녕하세요,
JMP에서 직접 Excel을 열고 있지만 가져온 후에 시간 형식이 hh : mm : ss를 차감합니다.
아래 표는 Excel에서 가져온 것이지만 JMP 표에서는 수입 후 2018 / 08 / 0X에 불과합니다.
TEST_START_TIME TEST_STOP_TIME
| 2018/08/03 17:54:02 |
2018/08/03 19:25:36 |
| 2018/08/03 19:25:36 |
2018/08/03 19:28:04 |
| 2018/08/03 21:05:08 |
2018/08/03 21:07:39 |
| 2018/08/05 20:52:09 |
2018/08/05 20:53:17 |
| 2018/08/05 20:52:09 |
2018/08/05 20:53:17 |
| 2018/08/05 20:52:09 |
2018/08/05 20:53:17 |
스크립트를 Excel을 열려면 : (필자는 스크립트와 관련이 있다고 생각하지만 Excel 파일을 가져 오는 설정으로 생각하지 않지만 환경 설정에서 찾을 수는 없습니다.) 간과하지 않는 한 수동 w / o 스크립트 가져 오기를 계속 시도했습니다. 고마워요!
Names Default To Here( 1 );
Wait(3);
Close All (Data Tables, Nosave);
Close All (Journals, Nosave);
mypath = "C:\jmp\";
Set Current Directory( mypath );
y = Files In Directory( mypath );
For( i = N Items( y ), i > 0, i--,
If( Ends With( y[i], "txt" ),
,
Remove From( y, i )
)
);
n = N Items( y );
For( i = 1, i <= N Items( y ), i++,
sname=left(y[i],length(y[i])-4);
/* If the file is the first in the list, open it. Otherwise, open the table, concatenate with the main table, and close the table just opened. */
If( i == 1,
mainDt = Open( mypath || y[i] );
mainDt << New Column ("source", character, set each value ( sname )),
dt = Open( mypath || y[i] ) ;
dt << New Column ("source", character, set each value ( sname ));
mainDt = mainDt << Concatenate( dt, Append to First Table );
Close( dt, NoSave );
Wait( 0 );
)
);
지정한 Excel 파일이 첨부됩니다. 아래는 파일을 열고 표시 형식을 수정하는 스크립트입니다. 희망이 도움이됩니다.
Names Default to Here(1);
dt = Open("C:/temp/Excel_DateTime_Aug2018.xlsx");
dt:TEST_START_TIME << Format( "y/m/d h:m:s", 22, 0 );
dt:TEST_STOP_TIME << Format( "y/m/d h:m:s", 22, 0 );