Hallo an alle!
So verwenden Sie JSL oder Formel, um den Text von Spalte 1 in das Zeitformat von Spalte 2 zu konvertieren.
Danke!

Hier ist ein Format, das mit den von Ihnen bereitgestellten Beispielen funktioniert.Es muss für andere Kombinationen von Werten und Strukturen angepasst werden.Beigefügt ist eine Beispieldatentabelle mit der angewendeten Formel
If( Row() == 1,
moList = {"January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December"};
moAbvList = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec"};
);
If(
Word( 3, :Mdfc, " /-" ) == "",
theDay = Num( Substr( :Mdfc, 1, 2 ) );
theMonth = Contains( moAbvList, Substr( :Mdfc, 4, 3 ) );
theYear = Num( Word( -1, :Mdfc, "abcdefghijklmnopqrstuvwxyz" ) );
Show( theday, themonth, theyear, Substr( :Mdfc, 4, 3 ) );,
Is Missing( Num( Word( 2, :Mdfc, " /-" ) ) ) == 1,
theDay = Num( Word( 1, :Mdfc, " /-" ) );
theMonth = Contains( moList, Word( 2, :Mdfc, " /-" ) );
theYear = Num( Word( 3, :Mdfc, " /-" ) );,
Is Missing( Num( Word( 1, :Mdfc, " /-" ) ) ) == 1,
theDay = Num( Word( 2, :Mdfc, " /-" ) );
theMonth = Contains( moList, Word( 1, :Mdfc, " /-" ) );
theYear = Num( Word( 3, :Mdfc, " /-" ) );,
theDay = Num( Word( 2, :Mdfc, " /-" ) );
theMonth = Num( Word( 1, :Mdfc, " /-" ) );
theYear = Num( Word( 3, :Mdfc, " /-" ) );
);
Date MDY( theMonth, theDay, theYear );Das ist der Stil, danke!
Der Effekt ist derselbe:
format(x, "y/m/d") ———— format(x, "jjjjjmmtt")
Der Format() Funktion wird verwendet, um a umzuwandeln JMP-Datum, -Zeit oder -Zeitwert zu einer Textzeichenfolge.
Zum Beispiel:
x=informat("20000214");
show(format(x, "m/d/y"));
show(format(x, "d/m/y"));
show(format(x, "Date Long"));
show(format(x, "Monddyyyy"));
Ergebnisse dazu im Log:
Format(x, "m/d/y") = "02/14/2000";
Format(x, "d/m/y") = "14/02/2000";
Format(x, "Date Long") = "Monday, February 14, 2000";
Format(x, "Monddyyyy") = "Feb142000";
Wie kann JMP den Text von Jahr, Monat und Tag aus dem Datumsformat abrufen?
Entschuldigen Sie die erneute Störung, danke!

@txnelson Die Formel von wird funktionieren, aber es gibt eine etwas einfachere Formel, die auch funktioniert.

Dieser verwendet Informationen() um die Datums- und Zeitwerte umzuwandeln.
Informat( Word( 1, :Column 1 ) ) +Informat( Word( 2, :Column 1 ), "h:m" )
Hier ist die Formel für die Umrechnung
Date DMY(
Num( Substr( :date, 7, 2 ) ),
Num( Substr( :date, 5, 2 ) ),
Num( Substr( :date, 1, 4 ) ) ) +
60 * 60 * Num( Word( 2, :date, " :" ) ) +
60 * Num( Word( -1, :date, " :" ) )