Synthetic Classic has reached end of support and is no longer available. Existing Synthetic Classic customers have been upgraded to the all-in-one Dynatrace software intelligence platform.

Calculating time difference between two dates

To calculate the difference, in milliseconds, between two dates, use this JavaScript in a Custom action.

beginTime = new Date();
endTime = new Date();
diff = (endTime - beginTime) / 1000;