Calculates the difference between two dates in milliseconds.
datemilliseconddifference(startDate, endDate)
| Parameter | Type | Description |
|---|---|---|
startDate |
String | Start date (ISO 8601 format) |
endDate |
String | End date (ISO 8601 format) |
String - The number of milliseconds between the two dates.
The datemilliseconddifference function calculates how many milliseconds have elapsed between two dates. The result is positive when endDate is after startDate, and negative otherwise.
Result = DATEMILLISECONDDIFFERENCE("2025-04-01T10:00:00.000Z", "2025-04-01T10:00:00.500Z")
// Result: "500"
ExecutionTime = DATEMILLISECONDDIFFERENCE(StartTime, EndTime)
LatencyMs = DATEMILLISECONDDIFFERENCE(RequestTime, ResponseTime)
- Performance profiling: Precise execution times
- Latency measurement: Network latency
- Animation timing: Frame durations
- Benchmarking: Comparing execution speeds
- dateseconddifference - Difference in seconds
- dateaddmilliseconds - Add milliseconds to a date
- Uses ISO 8601 date format
- Result can be negative
- Highest precision time difference
- Uses the Dates service internally