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

78
Views
Formatting date with moment.js

I have a date like this 2021-10-20T07:03:02-04:00 and from this date I need to make date like this: Wednesday 7:03am

My try:

moment(date).format('dddd h:mma');

But I get Wednesday 14:03am. Do you have any idea how to fix it?

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

0

As mentioned in momentjs docs you can do it like this

moment(someday).format('dddd HH:MM a');

moments docs >>

about 4 years ago · Juan Pablo Isaza Report

0

This should work fine, the problem is that your initial date is in wrong format.

moment(date).format('dddd hh:mm a');
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!