Error seperating DATETIME to Date

Five Stars

Error seperating DATETIME to Date

Hi All,
I am trying to separate DATETIME into DATE. I am getting both tables from PostgreSQL. The DATETIME and DATE is in Timestamp without Timezone type.
I am using T-map to match. In T-map, the type is date for both datetime and date.
I have entered:
TalendDate.formatDate("dd-MM-yyyy", row1.datetime)
However, I received an error message: "Type mismatch: cannot convert from String to Date."
Please help.

Five Stars

Re: Error seperating DATETIME to Date

I am sorry for the repeated post. I am new to this forum. There is a problem loading the question and now I am unable to delete the unwanted post.
Twelve Stars

Re: Error seperating DATETIME to Date

I have entered:
TalendDate.formatDate("dd-MM-yyyy", row1.datetime)
However, I received an error message: "Type mismatch: cannot convert from String to Date."
Please help.

Hi,
in description for each function in tMap You can see - what type of data function expect as parameters and which return
You must compare all columns data types, including source and target (where You store function result)
-----------
Five Stars

Re: Error seperating DATETIME to Date

Hi, for DateTime in row1(input column), the Type is Date. It is in the format of (dd-MM-yyyy HH:mm:ss)
For Date in output row, the Type is also Date.
I have put the expressions in the output row TalendDate.formatDate("dd-MM-yyyy", row1.DateTime).
However, I get the error message "Type mismatch: cannot convert from String to Date")
Five Stars

Re: Error seperating DATETIME to Date

Hello. The question has been resolved in the other post. Thanks!