JavaScript Date Function

The JavaScript Date function is one of the Date Function, which is used to return the Current Date and Time. In this article, we show you how to use the Date method in JavaScript Programming with an example.

JavaScript Date Function Example

The following JS example helps you understand the Date Function.

<!DOCTYPE html>
<html>
<head>
    <title> JavaScript Date Functions </title>
</head>
<body>
    <h1> JavaScript Date Function Example </h1>
<script>
  var dt = Date();
    
  document.write("Date and Time :   " + dt);
</script>
</body>
</html>
Date and Time: The Nov 01 2018 11:32:39 GMT+0530 (Indian Standard Time)