This article explains how to convert a Unix timestamp to a readable date in a Talend Job.
This procedure was written with:
Talend Open Studio for DI 5.0-r72978
Data Integration releases: 4.2.3, 5.0, 5.0.2, 5.1.1
JDK version: Sun JDK build 1.6.0_26-b03
Operating system: Windows XP SP3
Talend verified this procedure to be compatible with:
Talend Open Studio for Data Integration releases: 4.2.3, 4.2.4, 5.0.0, 5.0.1, 5.0.2, 5.1.1, 5.1.2, 5.2.0
A Unix timestamp is a series of numbers such as 13959.583,1330578363. As you can see, it is quite unreadable. This procedure explains how to convert it to a readable date or map it to the target system format.
Assuming we have the following unix timestamp in a file:
Create an example Job
Create a demo Job called ConvertUnixTime. The detailed Job settings can be seen below:
Execute the Job
Execute the Job. The following results are output to the console:
Starting job ConvertUnixTime at 14:47 01/03/2012.
[statistics] connecting to socket on port 3659
Job ConvertUnixTime ended at 14:47 01/03/2012. [exitcode=0]