"C.F. Scheidecker Antunes" <[EMAIL PROTECTED]> wrote: > > I wonder if is there any way to select from a table all the records > which has a Date Field that is at least five minutes old? > > In other words, I have a table with a date field and I need to select > all the records that are older than five minutes, has their date field > updated > before five minutes. > > Usually I do it with days by using the to_days() function and comparing > the date to now: (to_dayss(now()) - to_days(somedate)). > > I wonder if I could do the same with minutes.
DATE type doesn't have time part. Use DATETIME instead. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]