![]() |
Help with dates
can anyone tell Me what code i need to use to subract two dates and come up with the number of day's hours minutes sec's in between?? i can;t seem to get anything to work
thanks in advance --jsell |
Let's say your two variables containing the seperate dates, which would be retrieved from a database query, are called $date1 and $date2. We will assume $date1 to be the more recent date.
Here is a basic way: PHP Code:
Quote:
Here is with months included: PHP Code:
And here is a more flexible way giving you to do whatever with each time variable: PHP Code:
|
Thanks Velocd! :) that gave exactly what Ineeded! I appriciate your help
--jsell |
All times are GMT. The time now is 11:21 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|