suga Posted November 21, 2006 Share Posted November 21, 2006 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 More sharing options...
Guest wawa Posted November 21, 2006 Share Posted November 21, 2006 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 More sharing options...
aspnetguy Posted November 21, 2006 Share Posted November 21, 2006 problem is, that website is in French! Link to comment Share on other sites More sharing options...
justsomeguy Posted November 21, 2006 Share Posted November 21, 2006 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 More sharing options...
suga Posted November 27, 2006 Author Share Posted November 27, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now