Posts

Showing posts with the label How to get current date and time in Javascript

get current date and time in Javascript | Javascript 2020

 How to get current date and time in Javascript We can access date and time most of the language. So how we will get the current date and time? What are the statements use for it? So lets begin. 1. You must know about javascript  To get the current date and time through javascript you must have a little knowledge about javascript language. Basically javascript is a side scripting language use to make websites more dynamic. So you must know about it.  2. Lets start with date  Date inside the javascript is an object which returns a lot of information about date and time such as seconds, minutes etc. To use it we must create an object of date and we will store it in the Variable. See below to understand it clearly.  var date = new Date()  3. What we can access from Date() object?  We can access the following things from Date() object.  Milliseconds  Seconds  Minutes  Hours  Days  Weeks  Months  Years  4. How t...