RE: [PHP] Counting months between two dates
if done in mysql: SELECT PERIOD_DIFF(DATE_FORMAT("2002-06-05","%Y%m"),(DATE_FORMAT("2001-08-27","%Y%m ") ); -Original Message- From: John Hughes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 12:33 PM To: [EMAIL PROTECTED] Subject: [PHP] Counting months between two dates I want to determine the number of months between two dates. Is there a function in PHP or a way to make strtotime do the job? For instance, how many months between 2001-08-27 and 2002-06-05. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Counting months between two dates
John, Are you pulling dates from mysql? If so, let mysql do it for you. If you don't know how, ask again. -Original Message- From: John Hughes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 12:33 PM To: [EMAIL PROTECTED] Subject: [PHP] Counting months between two dates I want to determine the number of months between two dates. Is there a function in PHP or a way to make strtotime do the job? For instance, how many months between 2001-08-27 and 2002-06-05. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php