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

171
Views
Cómo obtener el TOTAL DE DÍAS de dos fechas (una en la base de datos sql y luego la fecha de hoy (fecha del sistema))

Necesita mostrar el total de días en la tabla html.

Tengo la primera fecha en la tabla myhpadmin [CREATED_AT] y luego la fecha de hoy (no en la base de datos). Solo qué mostrar el total de días en mi tabla html, cuando abro la página web.

Obtuve el código del script de la búsqueda, pero no muestra la información en absoluto.

No estoy seguro de cómo usar la impresión en el script

 <td> <?php $date = $checkSqlRow["DAYS_OLD"]; ?></td> <script> $date1 = $date = $checkSqlRow["CREATED_AT"]; $date2 = today; $diff = abs(strtotime($date2) - strtotime($date1)); $years = floor($diff / (365*60*60*24)); $months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24)); $days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); printf("%d days\n", $days);
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

¡Con la ayuda de alguien, está funcionando! dentro de la td

about 4 years ago · Santiago Gelvez 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!