1
votes

I'm trying to convert a epoch timecode to a date in Pentaho Spoon. I use an input text file to extract fields from. I want to export the fields in a database but there is this timestamp field that contains epoch timestamps like this "1480017396", the datatype is set as an integer and the field is named timestamp. I want to convert with it with Select value.

So I go to the next step and use the select value option to select the field and change the datatype to Date with a format of dd/MM/yyyy the result gives me all kinds of dates in 18-01-1970 range. I tried everything (Different formats etc.) but I just can't seem to solve it.

Any guesses? Image of output

1

1 Answers

0
votes

The time in epoch is in miliseconds, not seconds, so, take your number, multiply by 1000, and turn to date.

See that if you divide, the date goes back a few ... and multiply it you get the correct date because of the timestamp.

enter image description here