How to get current date and time

Description

Date.now() returns current time in the millisecond.

Example


var start = Date.now(); 
console.log(start);

The code above generates the following result.





















Home »
  Javascript »
    Javascript Reference »




Array
Canvas Context
CSSStyleDeclaration
CSSStyleSheet
Date
Document
Event
Global
History
HTMLElement
Input Element
Location
Math
Number
String
Window