Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f5TCEla15306 for ; Fri, 29 Jun 2001 08:14:47 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5N3Vja18410 for ; Fri, 22 Jun 2001 23:31:45 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f5N3U6649971 for pgsql-sql@postgresql.org; Fri, 22 Jun 2001 23:30:06 -0400 (EDT) (envelope-from news) From: "Jackie Siu" X-Newsgroups: comp.databases.postgresql.sql Subject: day difference Date: Sat, 23 Jun 2001 11:31:37 +0800 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 9 Message-ID: <9h12ft$1gpg$1@news.tht.net> X-Complaints-To: scrappy@hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 To: pgsql-sql@postgresql.org X-Archive-Number: 200106/465 X-Sequence-Number: 3768 Hi, Is there exist a function to calculate day difference between two date. For example: select functionx('1JAN2001','5FEB2001') from abc where .... Then it returns 36 (days). Thanks for your help. Jackie