Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
TalendDate.parseDate(TalendDate.formatDate("dd.MM.yyyy",row1.MYDATECOLUMN)+ " " + TalendDate.formatDate("HH:mm",row1.MyTIMECOLUMN), "dd.MM.yyyy HH:mm")
Exception in component tMap_1
java.lang.RuntimeException: java.text.ParseException: Unparseable date: "dd.MM.yyyy HH:mm"
at routines.TalendDate.parseDate(TalendDate.java:864)
String date1="08.08.2014";
String date2 = "13:57";
String totDate = date1+" "+date2;
System.out.println(totDate);
TalendDate.parseDate("dd.MM.yyyy HH:mm",totDate));
Above works if both date and time are string..., else you need to do some manipulations...
TalendDate.formatDate("dd.MM.yyyy", row1.MYDATECOLUMN)
+" "+row1.MYTIMECOLUMN
TalendDate.parseDate("dd.MM.yyyy HH:mm", TalendDate.formatDate("dd.MM.yyyy", row1.MYDATECOLUMN)+" "+row1.MYTIMECOLUMN)
first try concatenating both date fields and they try converting... like below (Below I am assuming both of your fields are string, if not, then first convert it to string, concatenate and assign to some string variable and then use that variable in below statement)
TalendDate.parseDate(TalendDate.formatDate("dd.MM.yyyy HH:mm",row1.MYDATECOLUMN+row1.MyTIMECOLUMN))
String date1="08.08.2014";
String date2 = "13:57";
String totDate = date1+" "+date2;
System.out.println(totDate);
TalendDate.parseDate("dd.MM.yyyy HH:mm",totDate));
Above works if both date and time are string..., else you need to do some manipulations...
TalendDate.formatDate("dd.MM.yyyy", row1.MYDATECOLUMN)
+" "+row1.MYTIMECOLUMN
TalendDate.parseDate("dd.MM.yyyy HH:mm", TalendDate.formatDate("dd.MM.yyyy", row1.MYDATECOLUMN)+" "+row1.MYTIMECOLUMN)