Looping Dates.

[email protected] (J Alejandro Ceballos Z)
Newsgroups perl.beginners.cgi
Message-ID <[email protected]>
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:
> 	<[email protected]>
>
>
> ----------------------------------------------------------------------
>
> De: <[email protected]>
> Fecha: 19 de enero de 2008 12:39:34 a.m. GMT-06:00
> Para: <[email protected]>
> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.