RTFM...

http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html
#Date_and_time_functions


SELECT DATE_FORMAT(datefield,'%j') FROM table  ....


David Piasecki
Software Engineer
Netvolution.com, Inc.
http://www.netvolution.com
548 South Spring Street, Suite 814, Los Angeles CA 90013
Phone: 213-593-1090 x107
Fax: 213-593-1091


-----Original Message-----
From: Greg Peretti [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 01, 2002 12:57 PM
To: [EMAIL PROTECTED]
Subject: Determining day of year

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?



--

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



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to