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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

datetime to timestamp conversion

Hi, I'm new to Talend I have no idea about datetime to timestamp conversion I tried changing date pattern in expression column for the target table in tmap, no error and migration worked fine but then no date value stored in the new column for date (because it's a timestamp db type) it's all null, is there any way I can do to solve this? 

 

Thanks! 

Labels (2)
11 Replies
TRF
Champion II
Champion II

What's the DB engine?

Can you share the expression you're using with a sample of input data?

Anonymous
Not applicable
Author

Oracle as target and Informix as input. 

 

dtcreatedate (datetime) -> i'm just using row1.dtcreatedate in the expression column for createdate (timestamp). I tried turning the datetime values into string and parse it into date format again but nothing works and createdate (timestamp) in oracle db is still null.

Anonymous
Not applicable
Author

I think you need to show us screenshots of your job and your component configurations for the components which are using/manipulating this date.

Anonymous
Not applicable
Author

 

input schema:

0683p000009M0Ky.jpg

 

output schema:

 

0683p000009M0mS.jpg

 

im also not really good with Java so i cant write the exact expression for timestamp conversion, so I just simply map it like this for the date column and it didnt store anything.
0683p000009M0mX.jpg

 

ETA: for example data from input column is 2018-07-10 16:46:33 and it wasnt inserted into target column, just null value.

Anonymous
Not applicable
Author

Can you remove your target DB component and replace it with a tLogRow. Then run the job and let us know what you get?

Anonymous
Not applicable
Author

i've tried that before, on tLogRow i could see the date values but it didnt work when i connected tmap to the target db i think it's because oracle db has timestamp and it rejects datetime value? 

Anonymous
Not applicable
Author

You are actually converting from a Java Date object to an Oracle Timestamp, so it is not to do with Datetime to Timestamp. If you are seeing dates output by the tLogRow, it means the Date is available in the job. Are you getting any errors in the job and did you build it or inherit it from someone else? The reason i ask is that you can configure db components to omit to insert values. If you have no error and you didn't create this job, I suspect the original developer has chosen not to insert the date values. Can you post a screenshot of the job as well?

Anonymous
Not applicable
Author

this is the job: 

 0683p000009M0mh.jpg

 

I'm just working on the data migration I created the db but I wasn't the one who designed it, that also means I can't change db components to have all the values stored without informing the original developer. And i didn't get any error after running a job it's just that the date value can't be stored to the target db. Is there any way to convert java date object to oracle timestamp? 

Anonymous
Not applicable
Author

Can you go to the advanced settings of your DB component (output) and show us what you have there. My suspicion is that your problem may be caused by the field options section