Search code examples
timestampetltalendmilliseconds

How to convert milliseconds into Timestamp using Talend


I have csv file where time_column is in milliseconds, Which I want in Timestamp(date & time). I have more than 100 rows which I need to convert.

Input :

1587740000000
1590600000000 
1588880000000
1589040000000
1589040000000

Output:
24-04-2020 20:23:20
27-05-2020 22:50:00
08-05-2020 01:03:20
09-05-2020 21:30:00
09-05-2020 21:30:00

Solution

  • I'm not sure, but this might help

    Converting a Unix timestamp to a readable date- Talend

    Using Java:-

    //As string
    String date = new java.text.SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(new java.util.Date(epoch*1000));
    //Epoch in seconds, remove '*1000' for milliseconds.
    
    //As Date
    java.util.Date date= new java.util.Date(epoch*1000);
    //Epoch in seconds, remove '*1000' for milliseconds.