Hi,
Ich öffne ein Excel direkt in JMP, aber nach dem Importieren des Zeitformats ziehe ich das hh:mm:ss ab.
Tabelle unten aus Excel, aber in der JMP-Tabelle ist es nur 2018/08/0X nach dem Import.
TEST_START_TIME TEST_STOP_TIME
| 03.08.2018 17:54:02 |
03.08.2018 19:25:36 |
| 03.08.2018 19:25:36 |
03.08.2018 19:28:04 |
| 03.08.2018 21:05:08 |
03.08.2018 21:07:39 |
| 05.08.2018 20:52:09 |
05.08.2018 20:53:17 |
| 05.08.2018 20:52:09 |
05.08.2018 20:53:17 |
| 05.08.2018 20:52:09 |
05.08.2018 20:53:17 |
Skript zum Öffnen eines Excel: (Ich glaube nicht, dass es mit meinem Skript zusammenhängt, sondern mit der Einstellung zum Importieren einer Excel-Datei, aber ich kann es nicht in den Einstellungen finden.) Sofern ich es nicht übersehen habe, habe ich versucht, manuell ohne Skript zu importieren, immer noch dasselbe. Bitte um Rat danke!
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 );
)
);
Angehängt ist die von Ihnen angegebene Excel-Datei. Unten ist ein Skript, das die Datei öffnet und das Anzeigeformat ändert. Ich hoffe, das hilft.
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 );