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

253
Views
calculate difference in HH:mm between two different time in same date with javascript

I have two date fields with different time - INIT1 and END1. I need to populate a third field TTL1 with the difference in hours and minutes between these two date fields.

Then I have two other date fields with different time - INIT2 and END2 and I have to do the same thing with these. In the end I have to add the two differences, one of which could be zero, to get the total time in hours and minutes. I've tried several solutions with the examples found here, but they don't fulfill my need.

I am a newbie, be understanding, please...Thank you

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

0

Do you already know the library "date-fns"? I think it can be useful for this case. I'm almost sure that this link can be the solution for your question.

https://date-fns.org/v2.28.0/docs/differenceInMinutes

(also, they have options for difference in seconds, hours, days and etc).

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!