How to Concatenate a date and a time field in Talend

How to Concatenate a date and a time field in Talend

Hello,
I am working with a file delimited CSV and I am trying to concatenate the Date and the time fields together. I have them set for a date string.
Date format = MM-DD-YYYY
time format = HH:mmSmiley FrustratedS
Examples of data is:
Time Date
8:08 1/10/2013
14:03 1/10/2013


When I do a readfile1.date + readfile1.time it gives me the following error:
The operator + is undefined for the argument type(s) java.util.Date, java.util.Date
I need these in a specific date format of YYYY-MM-DD HH:mmSmiley FrustratedS
I do apologize for even having to ask this. I have scoured the forums for this answer and everything that has been answered has not worked.
Thanks in advance,

Re: How to Concatenate a date and a time field in Talend

you are close Smiley Happy
you will simply need to convert your Date's to strings before you concat. Talend comes with some methods to do this:
routines.TalendDate.formatDate(pattern, date)

so your code would look something like this:
routines.TalendDate.formatDate("yyyy-MM-dd",readfile1.date) + " " + routines.TalendDate.formatDate("HH:mm:SS",readfile1.time)

edit: figured you might want a space between date and time