cast date components to longs