Enter Case number reference for associated cases.

Case #


Type: APM as a Service

Old Article ID: 3232

Old Article Type: howto



Detail the contextual information specific to the issue; i.e. Product, Version, Agent, System, etc.

  • Dynatrace Portal
  • Dynatrace Recorder

Describe the problem, from the user perspective

How to calculate the time difference in JavaScript.

Clearly list the Steps to resolve the issue

Use the following code to calculate the time difference in JavaScript:

beginTime = new Date();

endTime = new Date();

diff = (endTime- beginTime) / 1000;