I have a table of eventsthat has its timestamp for each row as data type datetime2(3) - ie. date and time with millisecond precision. An example timestamp would be 2011-01-02 13:31:43.567.
I need to calculate the Unix timestamp in a query, given that timestamp column. Does anyone have a simple way of doing this? I need the same precision, ie. millisecond precision. Unix time is calculated as a number of elapsed seconds (and milliseconds of course) since 1970-01-01 00:00:00.000 at GMT. So, in this example, the Unix time would be 1293975103.567.