'Convert datetime column to UNIX epoch timestamp using SSIS

I have a column from a CSV that stores datetime. I need to be able to do some simple calculations on the seconds of that datetime field. I want to know how I can convert the datetime field into the UNIX epoch timestamp using a derived column.

In SQL I would usually just do something like this:

DATEDIFF(second,{d '1970-01-01'},myDateTime)

Which gives me the integer value.

However I've tried the same in SSIS and get errors, why is this not correctly parsing?

enter image description here



Solution 1:[1]

Have you had a look at the SSIS documentation online for datediff? There tends to be usable examples in those docs.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ockert