1: Use the ticks expression to convert the date to a integer. 2: Use sub to calculate the difference. 3: Divide the result to get the time interval you need. See example for minutes past since the beginning of the hour: div(sub(ticks(utcNow()),ticks(startOfHour(utcNow()))),600000000)