Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
TalendDate.parseDate("yyyy-MM-dd H:mm:s",(TalendDate.getPartOfDate("YEAR",row2.date)+"-"+
(TalendDate.getPartOfDate("MONTH",row2.date)+1)+"-"+
TalendDate.getPartOfDate("DAY_OF_MONTH",row2.date)+" "
+TalendDate.getPartOfDate("HOUR",row1.date)+":"+TalendDate.getPartOfDate("MINUTE",row1.date)+":"+TalendDate.getPartOfDate("SECOND",row1.date)))
public class HOUR_OF_DAY {
public static int getPartOfDate(String partName, Date date) {
if (partName == null || date == null)
return 0;
int ret = 0;
String[] fieldsName = { "HOUR_OF_DAY"};
java.util.List<String> filedsList = java.util.Arrays.asList(fieldsName);
Calendar c = Calendar.getInstance();
c.setTime(date);
switch (filedsList.indexOf(partName)) {
case 0:
ret = c.get(Calendar.HOUR_OF_DAY);
break;
default:
break;
}
return ret;
}
}
TalendDate.parseDate("yyyy-MM-dd H:m:s",(TalendDate.getPartOfDate("YEAR",row2.date)+"-"+
(TalendDate.getPartOfDate("MONTH",row2.date)+1)+"-"+
TalendDate.getPartOfDate("DAY_OF_MONTH",row2.date)+" "
+HOUR_OF_DAY.getPartOfDate("HOUR_OF_DAY",row1.date) +":"+TalendDate.getPartOfDate("MINUTE",row1.date)+":"+TalendDate.getPartOfDate("SECOND",row1.date)))