RE: [GENERAL] Date arithmatic question

2000-11-20 Thread Francis Solomon
Hi Bryan, Try this: select * from t where date_part('days', 'now'::timestamp - s) = ?; Subtracting two timestamps in this way returns an 'interval', which (unless you use the 'age' function) doesn't figure out the months and the years - so 3 months would be rendered as "92 00:00" Also, note th

Re: [GENERAL] Date arithmatic question

2000-11-17 Thread Bryan \(Mailing Lists\)
Whoops, I had a typo in my translation; the second query I quoted should read as follows: select * from t where date_part('day', age('now', s)) = ? and date_part('month', age('now', s)) = 0 Thanks, Bryan - Original Message - From: "Bryan (Mailing Lists)" <[EMAIL PROTECTED]> To: <[EMAIL