Converting a UNIX timestamp to a readable date - 7.1


English (United States)
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
Talend Studio
Data Governance > Third-party systems > Processing components (Integration) > tMap
Data Quality and Preparation > Third-party systems > Processing components (Integration) > tMap
Design and Development > Third-party systems > Processing components (Integration) > tMap


  1. Create a .txt file example of a unix timestamp with the following data:
  2. Create a Job named ConvertUnixTime, composed of a tFileInputdelimited, a tMap and a tLogRow component linked by two main rows:
  3. Double click tFileInputdelimited to open its Component view and fill the File name/Stream field with path of the .txt file you created for example, "D:/file/in.txt".
  4. Click the ellipsis button (...) to edit the schema of the component and add a new column named unixDate.
    Note: The data entered can be read with double, float or long type.
  5. Double click tMap to configure it, drag and drop the unixDate column of the input table to the output table.
  6. Enter new java.util.Date((long)(row1.unixDate*1000)) into the expression box of the output table column.
  7. Change the Type of the data to Date in the Schema editor and enter the following Date pattern: "dd-MM-yyyy HH:mm:ss".Your should have the following schema:
  8. Execute the Job. The following results are output to the console: