PHP Tutorial - Find the number of days, hours, minutes and seconds between two dates

preview_player
Показать описание
In this php video tutorial you will learn how to calculate the number of days between two dates, number of hours between two dates, number of minutes between two dates and number of seconds between two dates.
Рекомендации по теме
Комментарии
Автор

This helped to sort out the struggle I had for some hours, thank you Sir!

zebronebanda
Автор

Wow, I've been searching for hours to try to get this to work and you've saved me :D Thank you!

NineMills
Автор

thank you so much! it was the headache for real.

your-coding-mentor
Автор

You save me sir! my problem for several hours.. thanks alot :)

MrPerea_
Автор

Really good video sir.. Thank you so much

prakashkoppal
Автор

You gave date in "YYYY-mm-dd" But if I have date in format ""Sat Mar 10 17:16:18 MST 2001" then what to do?

projavadevelopers
Автор

how about not specifying the old dates directly as integers but by using $date instead in which this variable has actual data in my database fdate field?

mnunez
Автор

hi iahd inserted 2020-03-01 12:30:00 in my database table (I assigned the type as DATETIME. The date is shown in my PhpMyAdmin. However, when I fetch and display it in my browser, it displays 1970-01-01... How to correct it?

mnunez
Автор

great thanks.. have you got one on extracting from phpmyadmin and counting each day the user refreshes the page? #longshot

rw
Автор

Also my $difference2 displays correctly as long as old date $oldDate = '2010-02--01 12:30:59. But what if I have several variables in my column of old dates to be used in displaying the difference of two dates on each row? I want to define $oldDate = $oldDate from every column....

mnunez
Автор

how can i do this without page load ??? pls anyone tell me....its important thing to working on project...

mrp_prfsnl
Автор

this doesn't work on H:i A format

markanthonydona
Автор

This is good tutorial sir but I have a question. What if I have dates entered in MySQL (start date and end date). How could I calculate the difference between two dates from MySQL and display the result in PHP? Your favorable help is highly appreciated.

gamechanger