From: Peter Carter Date: June 4 1999 10:33pm Subject: Re: function to use in where clause to compare yyyymmdd with a timestamp List-Archive: http://lists.mysql.com/win32/138 Message-Id: <3.0.1.32.19990604183359.00a1b9b0@gorf.pbc.ottawa.on.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 08:04 AM 6/4/99 -0700, you wrote: >Peter, > >You missed the point. If you look at the example I gave, I wanted to add 14 >days, then compare the resulting *date* to a date. > >And I found a solution: select * from tablename where date_add(timestampcol, >INTERVAL 14 DAY) <= 'yyyy-mm-dd' > >Works like a champ. And I could care less about Oracle and MSSQL. > Nither could I, MySQL is my dbm of choice. It's just that I deal with people that write for those 'other' DBM's and I see them fall into portability problems all the time (especially oracle people). One of the things I like most of MySQL is it is more standard thenn the rest.... ;) --- Peter B. Carter (peterc@stripped) Pager: 613-751-4660 http://www.pbc.ottawa.on.ca