Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.

Labels (2)
4 Replies
Anonymous
Not applicable
Author

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.
vapukov
Master II
Master II

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)
Anonymous
Not applicable
Author

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")
Anonymous
Not applicable
Author

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