Ask Question Sign In Sign Up
Home
Sign In
Sign Up
  • Home
  • >
  • Technology
  • >
  • How will you calculate days between two dates in PHP?
Books Business Design Economics Education Marketing Sports Technology
Category
Books
Business
Design
Economics
Education
Marketing
Sports
Technology

How will you calculate days between two dates in PHP?

Member

trycia.jones

by trycia.jones , in category: Technology , 2 years ago

How will you calculate days between two dates in PHP?

0 | 0
0
Facebook Twitter LinkedIn Telegram Whatsapp

1 answer


Member

kenny

by kenny , 2 years ago

Calculating days between two dates in PHP

1
2
3
4
5
6
<?php 
  $date1 = date('Y-m-d');
  $date2 = '2015-10-2';
  $days = (strtotime($date1)-strtotime($date2))/(60*60*24);
  echo $days;
?>
0 | 0
0

Related Threads:

How to get number of days between two given dates using PHP ?

What is the difference between one-way binding and two-way binding in AngularJS ?

What is the difference between == and === operator in PHP ?

What is difference between Method overriding and overloading in PHP?

What is difference Between PHP 5 and 7?

What are the differences between echo and print in PHP?

About us

  • Contact us
© 2023 Copyright: emediaworld.com

This Site is Created By mywebforum.com

Get Your Own Questions & Answers platform