
Anonymous
Not applicable
2016-01-05
12:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
convert the unix timestamp
Hello,
I want to convert the unix timestamp 1443696342801 into date ,
i am new to Talend , i converted 1298226724 into date using below logic , please see below attach screen shots:
But i am unable to convert this number 1443696342801
any suggestion will be helpfull
its little urgent
thanks
Amit
I want to convert the unix timestamp 1443696342801 into date ,
i am new to Talend , i converted 1298226724 into date using below logic , please see below attach screen shots:
But i am unable to convert this number 1443696342801
any suggestion will be helpfull
its little urgent
thanks
Amit
859 Views
- « Previous Replies
-
- 1
- 2
- Next Replies »
18 Replies

Anonymous
Not applicable
2016-01-06
02:39 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please try to use below expression in tMap:
new java.util.Date(row1.unixtimestamp)
Best regards
Sabrina
Please try to use below expression in tMap:
new java.util.Date(row1.unixtimestamp)
Best regards
Sabrina
617 Views

Anonymous
Not applicable
2016-01-06
05:38 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sabrina,
I have situation regarding Milliseconds to Date Conversion.
There are 2 columns in excell sheet which contains only millisecond values and that have to convert into a Given Date format
Please take following table as Source table..
TRISTARTDATEDA TRIENDDATEDA
1425148200 1423074600
1423074600 1482604200
Expected Outcome...
TRISTARTDATEDA TRIENDDATEDA
01-03-2015 05-02-2015
05-02-2015 25-12-2016
Please kindly suggest me solution for this .
I am Waiting for positive reply
I have situation regarding Milliseconds to Date Conversion.
There are 2 columns in excell sheet which contains only millisecond values and that have to convert into a Given Date format
Please take following table as Source table..
TRISTARTDATEDA TRIENDDATEDA
1425148200 1423074600
1423074600 1482604200
Expected Outcome...
TRISTARTDATEDA TRIENDDATEDA
01-03-2015 05-02-2015
05-02-2015 25-12-2016
Please kindly suggest me solution for this .
I am Waiting for positive reply
617 Views

Anonymous
Not applicable
2016-01-06
06:26 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
new java.util.Date(row1.unixtimestamp) was the correct answer.
row1.unixtimestamp should be a long type. this will create the correct Date based on the Unix epoch.
row1.unixtimestamp should be a long type. this will create the correct Date based on the Unix epoch.
617 Views

Anonymous
Not applicable
2016-01-06
07:49 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey,
Thanx for your reply but it doesnt seems to be working
it giving type casting error
Type Mismatch : Cannot convert from Long to Date
Type Mismatch : Cannot convert from Date to Long
My Source values are coming with Long Type and i put that logic you mentioned above in Target column and i give Date type to it
Is it Right?
Thanx for your reply but it doesnt seems to be working
it giving type casting error
Type Mismatch : Cannot convert from Long to Date
Type Mismatch : Cannot convert from Date to Long
My Source values are coming with Long Type and i put that logic you mentioned above in Target column and i give Date type to it
Is it Right?
617 Views

Anonymous
Not applicable
2016-01-06
07:55 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey,
Thanx for your reply but it doesnt seems to be working
it giving type casting error
Type Mismatch : Cannot convert from Long to Date
Type Mismatch : Cannot convert from Date to Long
My Source values are coming with Long Type and i put that logic you mentioned above in Target column and i give Date type to it
Is it Right?
Kindly find the uploaded image of mytMap....
If i put long type in the target also then job runs but it gives wrong values like
17-01-1970
Thanx for your reply but it doesnt seems to be working
it giving type casting error
Type Mismatch : Cannot convert from Long to Date
Type Mismatch : Cannot convert from Date to Long
My Source values are coming with Long Type and i put that logic you mentioned above in Target column and i give Date type to it
Is it Right?
Kindly find the uploaded image of mytMap....
If i put long type in the target also then job runs but it gives wrong values like
17-01-1970
617 Views

Anonymous
Not applicable
2016-01-06
08:48 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
617 Views

Anonymous
Not applicable
2016-01-09
02:43 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please try to use below expression in tMap:
new java.util.Date(row1.unixtimestamp)
Best regards
Sabrina
Hello Sabrina,
Thanks for your prompt reply,
I tried using your logic it seems to be working for ex-1298226724
but when i want to convert unixtimestamp 1443696342801 into date with timestamp i am getting error :invalid error
please check below error
Starting job unix at 22:38 09/01/2016.
connecting to socket on port 3771
connected
Exception in component tOracleOutput_1
java.lang.IllegalArgumentException: Invalid year value
at oracle.sql.TIMESTAMP.getOracleYear(TIMESTAMP.java:786)
at oracle.sql.DATE.toBytes(DATE.java:634)
at oracle.sql.DATE.toBytes(DATE.java:521)
at oracle.sql.DATE.<init>(DATE.java:116)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:9325)
at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8954)
at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:9548)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObject(OraclePreparedStatementWrapper.java:249)
at local_project.unix_0_1.unix.tOracleInput_1Process(unix.java:799)
at local_project.unix_0_1.unix.runJobInTOS(unix.java:1236)
at local_project.unix_0_1.unix.main(unix.java:1093)
disconnected
Job unix ended at 22:38 09/01/2016.
for your reference i am attaching the unix epoch converter output
10/1/2015, 1:45:42 PM
i want the output as 10/1/2015, 13:45:42 in 24hrs clock
617 Views

Anonymous
Not applicable
2016-01-18
09:04 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sabrina & All,
Kindly attention Please
....
I have situation in one of ETL job.
i want to convert or remove special charterers from data
Please find Image attached, it has some special charecters and these may found in some of the data ,
so how could we handle this by ETL. There is one column Replace_By which has values that have to replaced by there respective Special Characters. and that particular row which has that Special Character mentioned there have to stored in other file/table/tlogrow.
Please revert if you have any query regarding this.
.
Kindly attention Please
I have situation in one of ETL job.
i want to convert or remove special charterers from data
Please find Image attached, it has some special charecters and these may found in some of the data ,
so how could we handle this by ETL. There is one column Replace_By which has values that have to replaced by there respective Special Characters. and that particular row which has that Special Character mentioned there have to stored in other file/table/tlogrow.
Please revert if you have any query regarding this.
.
617 Views

Anonymous
Not applicable
2016-01-18
10:16 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shri_Kul1,
Here is a TalendHelpCenter:tReplace which carries out a Search & Replace operation in the input columns defined.
Best regards
Sabrina
Here is a TalendHelpCenter:tReplace which carries out a Search & Replace operation in the input columns defined.
Best regards
Sabrina
617 Views

- « Previous Replies
-
- 1
- 2
- Next Replies »