Converting Time and DateTime parameters to seconds