About 50 results
Open links in new tab
  1. How do I format a date in JavaScript? - Stack Overflow

    3084 If you need slightly less control over formatting than the currently accepted answer, Date#toLocaleDateString can be used to create standard locale-specific renderings. The locale and …

  2. How do I format a Javascript Date? - Stack Overflow

    Jun 12, 2009 · How do I format this date so that the alert displays the date in MM/dd/yyyy format? <script type="text/javascript"> var date = new Date (); alert (date); </script>

  3. Format JavaScript date as yyyy-mm-dd - Stack Overflow

    This Stack Overflow thread provides solutions for formatting JavaScript dates as yyyy-mm-dd.

  4. date - Current time formatting with Javascript - Stack Overflow

    Feb 1, 2013 · I want to get current time in a specific format with javascript. With the function below and calling it will give me Fri Feb 01 2013 13:56:40 GMT+1300 (New Zealand Daylight Time) but I want …

  5. Format a date string in javascript - Stack Overflow

    Jun 12, 2017 · 5 If the date string is always in ISO format, you can also use regex to reformat without other library:

  6. How to display a Date object in a specific format using JavaScript?

    Mar 2, 2012 · 2 Another JavaScript built-in library that you could now use to format a date, is the Intl library.

  7. How to change date format in JavaScript - Stack Overflow

    Dec 31, 2015 · How to change date format in JavaScript [duplicate] Asked 14 years, 3 months ago Modified 10 years, 1 month ago Viewed 461k times

  8. Parsing a string to a date in JavaScript - Stack Overflow

    How can I convert a string to a Date object in JavaScript? var st = &quot;date in some format&quot; var dt = new Date(); var dt_st = // st in Date format, same as dt.

  9. javascript - Display date/time in user's locale format and time offset ...

    I want the server to always serve dates in UTC in the HTML, and have JavaScript on the client site convert it to the user's local timezone. Bonus if I can output in the user's locale date format.

  10. javascript - Date Formatting Consistency Across Time Zones - Stack …

    Feb 9, 2024 · I'm currently working on a JavaScript function that formats dates using the Intl.DateTimeFormat constructor. The function takes a date string as input and formats it to a specific …