Ich habe einen Talend-Job, in dem ich versuche, eine Datumsstring im MM/TT/JJJJ-Format zu konvertieren: YYYYMM-Format.tJavaFlex Untrennbares Datum in Talend Öffnen Studio
Ich habe eine Komponente tJavaFlex erstellt und das folgende Snippet hinzugefügt.
java.util.Date MTDdate = new SimpleDateFormat("yyyyMM").parse(context.ReportMonthStr);
context.CurrentMonthMTDDate = MTDdate;
System.out.println("\tCurrentMonthMTDDate="+context.CurrentMonthMTDDate);
, die die folgenden Fehler wirft:
Exception in component tJavaFlex_1
java.text.ParseException: Unparseable date: "05/01/2016"
I thought we can use the SimpleDateFormat within tFlex for date conversions. What am I doing wrong? Is there a better way to convert to YYYYMM format?
TIA.