Am Donnerstag, 5. Mai 2005 22.46 schrieb Diogo Nunes de Oliveira: > Hi all,
Hi Diogo > Iīm having quite a problem here... My script works with postgree. Now i > want to get a result from a date range... But I just canīt get it done... > Explaining... Letīs supose I want to get all registers from 05/01/2005 to > 05/05/2005. How do I do that? > Iīm trying SELECT * FROM table WHERE date BETWEEN $inicial AND $final; > and > SELECT * FROM table WHERE (date > $inicial) AND (date < $final); > But I just canīt get it done... Thanks in advance... See chapter 11.3 of the mysql online documentation http://dev.mysql.com/doc/mysql/en/date-and-time-types.html about date format. It states for instance: "Although MySQL tries to interpret values in several formats, dates always must be given in year-month-day order (for example, '98-09-04'), rather than in the month-day-year or day-month-year orders commonly used elsewhere (for example, '09-04-98', '04-09-98')." (your question is not perl related, the mysql list would be appropriate) hth, joe > -- > Diogo N Oliveira - Instrutor EAD - Senai CEDESG -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>