About 521,000 results
Open links in new tab
  1. How do I get the current date in JavaScript? - Stack Overflow

    Oct 7, 2009 · Use new Date() to generate a new Date object containing the current date and time.

  2. Getting current date and time in JavaScript - Stack Overflow

    I think JavaScript will get the current date and time from System. Hence, set the current date and time in your Computer.

  3. html - How to get current formatted date dd/mm/yyyy in Javascript …

    Sep 13, 2012 · Use the DOM's getElementByid method: document.getElementById("DATE").value = "your date"; A date can be made with the Date class: d = new Date(); (Protip: install a javascript …

  4. How do I get a timestamp in JavaScript? - Stack Overflow

    I want a single number that represents the current date and time, like a Unix timestamp.

  5. Javascript to display the current date and time - Stack Overflow

    Learn how to display the current date and time using JavaScript.

  6. date - Get the current year in JavaScript - Stack Overflow

    May 14, 2011 · Learn how to get the current year in JavaScript with examples and explanations.

  7. How do I get the current time only in JavaScript - Stack Overflow

    Apr 30, 2015 · How can I get the current time in JavaScript and use it in a timepicker? I tried var x = Date() and got: Tue May 15 2012 05:45:40 GMT-0500 But I need only current time, for example, …

  8. javascript - How to add days to Date? - Stack Overflow

    Feb 19, 2009 · How to add days to current Date using JavaScript? Does JavaScript have a built in function like .NET's AddDay()?

  9. javascript - How to add hours to a Date object? - Stack Overflow

    It amazes me that JavaScript's Date object does not implement an add function of any kind. I simply want a function that can do this: var now = Date.now(); var fourHoursLater = now.addHours(4);

  10. How do I get a date in YYYY-MM-DD format? - Stack Overflow

    Aug 25, 2015 · 36 Normally if I wanted to get the date I could just do something like var d = new Date(); console.log(d); The problem with doing that, is when I run that code, it returns: Mon Aug 24 2015 …