I have date values stored as integers in the format YYYYMMDD.
Time values are also stored as integers, so there are no leading zeros. Here are some examples
13:00 is stored as 130000
09:30 is stored as 93000
Midnight + 1 second is stored as 1
Midnight + 1 minute is stored as 100
Suppose I have two tables with these date time values. How do I evaluate the number of time between the relevant rows? If they are on the same day I need to compare the hours, minutes and seconds. Otherwise the number of days, weeks etc.