Module:Editor
Version:26.07 +
Description
The formula 'MsInPeriod' returns the number of milliseconds between two date/time values. The result is calculated as End_date minus Start_date and is returned as a whole number (Long).
If End_date is later than Start_date the result is positive, if it is earlier the result is negative, and if the two values are equal the result is 0. This is useful, for example, to measure the number of milliseconds between the current moment (Now) and a date/time returned by a web service or API.
Parameters
Start_date:
is the beginning of the period.
End_date:
is the end of the period.
Example
Description
Below here you will find some examples of the 'MsInPeriod' formula:
Start_date:
1-1-2026 00:00:00.000
End_date:
1-1-2026 00:00:01.500
Result:
1500
Start_date:
1-1-2026 00:00:00.000
End_date:
1-1-2026 00:00:00.000
Result:
0
Start_date:
1-1-2026 00:00:01.000
End_date:
1-1-2026 00:00:00.000
Result:
-1000
Related Topics
- Now: The formula 'Now' returns the current date and time.
- UTCNow: The formula 'UTCNow' returns the current date and time in UTC.
Feedback
If you have any questions about this subject or if you want to provide us feedback please send us an e-mail.