Shouldn't it be as simple as multiplying with 24*60*60? Unless I am mistaken, a date for example 10/26/2011 7:17 will give a value of 40842.30411 which can be multiplied with 24*60*60 to give 3528775076 (approximately)

If this is not what you are looking for, can you post the original code? Maybe we can try reversing it.