Convert a date into a number and vice versa
