Received: from home.priority.net (home.priority.net [204.27.108.182]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA03546 for ; Mon, 16 Aug 1999 11:46:19 -0400 (EDT) (envelope-from tpham@mail.priority.net) Received: by home.priority.net with Internet Mail Service (5.5.2448.0) id ; Mon, 16 Aug 1999 11:02:27 -0500 Message-ID: <551413BBBB03D111BF880060B01AACCE139F30@home.priority.net> From: "Pham, Thinh" To: "'pgsql-sql@postgreSQL.org'" Subject: datediff function Date: Mon, 16 Aug 1999 11:02:20 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" Hi everyone, Does anyone know if postgres has a function similar to what datediff does in mssql server? I need it to do an update similar to the one below: "update schedule set purged = 0 where datediff(day, timein, getdate()) > 30" I know i could pull the whole table down to my machine, modify the data and then upload it back, but that's really stupid not to mention what it'll do to network trafic. Thank you very much for any answer, Thinh