El 19/01/2008, a las 12:39 a.m., [EMAIL PROTECTED] escribió:


beginners-cgi Digest 19 Jan 2008 06:39:46 -0000 Issue 989

Topics (messages 13145 through 13145):

Looping Dates.
        13145 by: sara.samsara.gmail.com

Administrivia:

To subscribe to the digest, e-mail:
        <[EMAIL PROTECTED]>

To unsubscribe from the digest, e-mail:
        <[EMAIL PROTECTED]>

To post to the list, e-mail:
        <beginners-cgi@perl.org>


----------------------------------------------------------------------

De: <[EMAIL PROTECTED]>
Fecha: 19 de enero de 2008 12:39:34 a.m. GMT-06:00
Para: <beginners-cgi@perl.org>
Asunto: Looping Dates.


I am stuck here, I want to get list of dates in a certain range. Like: Start Date: 2007-01-03 to End Date: 2007-05-30

I am pointless here as what should I do in order to get all dates between start and end? Is there any for, foreach loop or other method? that will generate a list of dates:


Do you mean to retrieve?

like SELECT something FROM tbl_name WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col

or to populate?

like INSERT dates INTO tbl_name (NOW()); ?


maybe with some Date function via mysql
        http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html


 J. Alejandro Ceballos Z.



Reply via email to