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

93
Views
Modal boostrap compare 2 date

I am beginner using bootstrap PDO and php. javascript How can I compare 2 date like image below.

enter image description here

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

0

It depens on when/where u want to compare them. While filling out the form will require JS/Jquery. After submitting requires PHP.

In PHP it should work like this:

$date1 = "2022-02-02";
$date2 = "2021-01-01";
$dateTime1 = strtotime($date1);
$dateTime2 = strtotime($date2);

if ($dateTime1 > $dateTime2){
   echo "$date1 is latest than $date2";
}else{
   echo "$date1 is older than $date2";
}

PHP manual strtotime().

For JQuery use this thread.

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!