How to use the MOD function to calculate time values