Jump to content

PHP Date difference (conditional) in days.


inchirieri

Recommended Posts

Dear all,

 

I am currently trying to calculate the date difference with a PHP Script. The days are in a calendar control, while the time is in 2 dropboxes (hour/minute).

 

You can see here my demo form.

 

I need the PHP script to return the date in days, using the following formula.

If the difference between the dates is **> X days and more than 2 hours**, then the difference is X+1 days, otherwise it's X Days.

 

Could anybody provide a solution please?

Link to comment
https://forums.phpfreaks.com/topic/243831-php-date-difference-conditional-in-days/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.