How do I turn the time into a number?

From img 30 minute , I want the values ​​to be displayed in the google sheet.
30min = 0.5
60min = 1
90min = 1.5

and keep adding more to the old value


You can use Luxon’s diff method for this. However your date timestamps will need to be parsed first and from the looks of it that timestamp is not in a common format.

The expression {{ DateTime.fromISO($json["endclass"]).diff(DateTime.fromISO($json["startclass"]), 'hours').toObject().hours }}

1 Like