X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 51327D83B8 for ; Fri, 9 Sep 2005 13:05:01 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 23268-05 for ; Fri, 9 Sep 2005 16:04:53 +0000 (GMT) Received: from BCMEVS5.ad.bcm.edu (bcmexps05.corp.bcm.tmc.edu [128.249.232.15]) by svr1.postgresql.org (Postfix) with ESMTP id B6DB6D796A for ; Fri, 9 Sep 2005 13:04:49 -0300 (ADT) Received: from bcm120-8.taub.dhcp.bcm.tmc.edu ([128.249.120.8]) by BCMEVS5.ad.bcm.edu with Microsoft SMTPSVC(6.0.3790.1830); Fri, 9 Sep 2005 11:04:48 -0500 From: "Mark A. Strivens" Reply-To: strivens@bcm.edu Organization: Baylor College of Medicine To: pgsql-sql@postgresql.org Subject: Age in days Date: Fri, 9 Sep 2005 11:04:44 -0500 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509091104.45412.strivens@bcm.edu> X-OriginalArrivalTime: 09 Sep 2005 16:04:48.0371 (UTC) FILETIME=[33FA2C30:01C5B558] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 required=5 tests=[FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200509/138 X-Sequence-Number: 22685 If you need to know the age to the nearest day on the present day I think you can use something like: select date_trunc('day',age(now(),dateofbirth)) from people gives: 3 years 2 mons 12 days My questions is, is there any way to convert that figure into an age expressed as a number days only? Many thanks Mark