Received: from syse.dce.vic.gov.au (syse.nre.vic.gov.au [203.11.140.1]) by hub.org (8.9.1/8.9.1) with ESMTP id XAA27685; Sat, 7 Nov 1998 23:54:40 -0500 (EST) (envelope-from mathera@woody.agvic.gov.au) Received: from sysm.dce.vic.gov.au (sysm.dce.vic.gov.au [157.128.80.81]) by syse.dce.vic.gov.au (8.9.1a/8.9.1) with ESMTP id PAA05544; Sun, 8 Nov 1998 15:51:06 +1100 (EST) Received: from ag-gpo.agvic.gov.au (ag-gpo [157.128.36.36]) by sysm.dce.vic.gov.au with ESMTP id PAA19923 (8.8.5/IDA-1.7); Sun, 8 Nov 1998 15:51:20 +1100 (EST) Received: from woody.agvic.gov.au (woody.agvic.gov.au [157.128.79.21]) by ag-gpo.agvic.gov.au with ESMTP id PAA22903 (8.8.5/IDA-1.7); Sun, 8 Nov 1998 15:54:19 +1100 (EST) Received: from WOODY/SpoolDir by woody.agvic.gov.au (Mercury 1.31); 8 Nov 98 15:50:58 +11:00 Received: from SpoolDir by WOODY (Mercury 1.31); 8 Nov 98 15:50:45 +11:00 Received: from salmon by woody.agvic.gov.au (Mercury 1.31); 8 Nov 98 15:50:30 +11:00 Comments: Authenticated sender is From: "Andrew Mather (Powered By Linux)" Organization: COMPLETE LACK OF To: pgsql-novice@postgreSQL.org, pgsql-sql@postgreSQL.org Date: Sun, 8 Nov 1998 15:41:49 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: (Fwd) Hi and some advice on Dates Reply-to: mathera@woody.agvic.gov.au X-Confirm-Reading-To: mathera@woody.agvic.gov.au X-pmrqc: 1 Priority: normal X-mailer: Pegasus Mail for Win32 (v2.53/R1) Message-ID: <104E3CB13D06@woody.agvic.gov.au> G'day All, I am pretty new to postgres and am using it as a backend for DB's accessed via the web and Perl DBI. All this works really well and I have a few db's up and running on our Intranet at work, where they're quite heavily used. My current project requires me to do some date calculations and I'm stumped ! Could anyone help with the following: (I have not fixed data type yet, I will be guided by any info I can get) How to query a table and look for any records where the value in a date field is greater than (say) 10 days ago Calculate the difference between two times on the same day. (I have experimented with age() and it sort of does wht I want..is there any other way ?) I've searched the archives without success and the doc's don't give much away as far as this type of thing goes. Thanks in anticipation. Andrew -------------------------------------------------------- Andrew Mather: System Administrator, VIAS mathera@woody.agvic.gov.au / amsm@deakin.edu.au http://www.deakin.edu.au/~amsm/index.html Ph: 03 92174342 (BH), Mob 0413 009 761 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Linux: it's not just for breakfast anymore. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-