List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:February 1 2002 10:24pm
Subject:Re: Determining day of year
View as plain text  
At 14:57 -0600 2/1/02, Greg Peretti wrote:
>Hi, folks.
>
>I have what I hope is a simple problem. Hope someone can help.
>
>I have a database with a date field in the form 2002-02-01. I would like
>to be able to query the database to determine the day of year of an
>entry (the $yday variable in the localtime function in Perl). February 1
>would be the 32nd day of the year, for instance.
>
>Is this simple and/or possible?

Sure.  It's the DAYOFYEAR() function, and you can read about it in
the manual at:

http://www.mysql.com/doc/D/a/Date_and_time_functions.html

>
>
>
>--
>
>Greg Peretti
>web developer
>www.abqjournal.com
>(505) 823-3888
>
>-----------------------------------
>
>The web of our life is of a mingled yarn, good and ill together.
>-  William Shakespeare

Thread
Determining day of yearGreg Peretti1 Feb
  • RE: Determining day of yearDavid Piasecki1 Feb
  • Re: Determining day of yearNathan1 Feb
  • Re: Determining day of yearPaul DuBois1 Feb