take date and convert to day of year

From: Date: Tue, 13 Nov 2001 20:56:31 +0000
Subject: take date and convert to day of year
Groups: php.general 
Request: Send a blank email to php-general+get-74491@lists.php.net to get a copy of this message
Hi guys, I know that you can take todays date and display it as the numeric day of the year, 1 - 365 / 0 - 364 etc. But can you take a date such as (November-30-1971) and convert that to the numeric day of the year? I have been trying to do this but have had no joy, I don't think my code is even close. $dob = getdate("Nov-30-1971"); $dobnum = $dob['yday']; print $dobnum; $dob 'should' be an array and 'yday' should be the numeric value for the day of the year, right?!? This is what I am trying, and how I understand it, using 'yday' should give you basically the same output as date ("z"); What I would like is the ability to convert any date to the days numeric value. Any help would be GREATLY appreciated. (C:

« previous php.general (#74491) next »