DATEDIFF is going to be your friend here:
DATEDIFF
select datediff(s, '1970-01-01', '2012-12-12') as SecondsSinceEpoch
Note that because datediff returns an int, the maximum datetime you can compare (using seconds) with Jan 1st, 1970 is 2038-01-19 03:14:07.
2038-01-19 03:14:07