This can be obtained by using the Pre-defined object (Date) in JavaScript

Example:

document.write("The current date is:"+Date())