Jump to content

hi there..i need help


suga

Recommended Posts

hi fren, i need help from y0u all, i don't know how to do minus between dates using php..example if we minus this dates 2006/12/23 - 2006/11/22 , the answer should display differences are 31 days...pls reply me soon its very urgent...

Link to comment
Share on other sites

hi fren, i need help from y0u all, i don't know how to do minus between dates using php..example if we minus this dates 2006/12/23 - 2006/11/22 , the answer should display differences are 31 days...pls reply me soon its very urgent...
Have a see at www.phpcs.com. I remember they were an issue there.
Link to comment
Share on other sites

You will want to use this function to convert each date into a Unix timestamp:http://www.php.net/manual/en/function.mktime.phpSince the timestamps are just numbers, you can subtract one from the other to get a difference. The difference will be in seconds (not in days), so you divide the difference by 86400 to get days.

Link to comment
Share on other sites

problem is, that website is in French!
thanx...u sloved my problem....
You will want to use this function to convert each date into a Unix timestamp:http://www.php.net/manual/en/function.mktime.phpSince the timestamps are just numbers, you can subtract one from the other to get a difference. The difference will be in seconds (not in days), so you divide the difference by 86400 to get days.
Thanx u sloved my problem...
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...