Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

238
Views
JQuery / Javascript convert date from format "yyyy-mm-dd" to readable string

I am using an input field to get a date which is stored in a ISO format like "yyyy-mm-dd".

I want to convert it to a human-readable format to display in the HTML, so 2000-05-03 will look something like May 3, 2000.

How can I transform it from ISO format to American format?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You can achieve it using the below code:

var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
var today  = new Date();

console.log(today.toLocaleDateString("en-US", options));

Check here for more info - Another Date format related question

about 4 years ago · Juan Pablo Isaza Report

0

Yes, you can use toLocateDateString() for it. And with the options format the date.

For your example it will be like this:

const date = new Date("2000-05-03");
date.toLocaleString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })
console.log(date);

Will print May 3, 2000

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!