How to calculate with date and time in codeless?

How do I calculate something like this in codeless:

(DateTime1 - DateTime2).TotalMilliseconds()
(DateTime1 - DateTime2).TotalSeconds()
(DateTime1 - DateTime2).TotalDays()

etc.

Hello @Hans_Muster

First of all, you should convert your dates to timestamps, and after that, you can use math operations.

For example:
Data1 - Data2 = Total Milliseconds
(Data1 - Data2) / 1000 = Total Seconds
(Data1 - Data2) / 1000 / 60 / 24= Total Days

And so on, but don’t forget to convert dates to timestamps, and round the value.

Regards, Dima.

1 Like