Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eBCEfjm78030 for ; Tue, 12 Dec 2000 09:41:45 -0500 (EST) (envelope-from pgsql-sql-owner@postgresql.org) Received: from mailhost2.aepona.com ([194.46.24.7]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eB7GxZP77855 for ; Thu, 7 Dec 2000 11:59:36 -0500 (EST) (envelope-from K.Keatley@aepona.com) Received: from hobbs ([10.10.10.148] helo=aepona.com ident=kk0298) by mailhost2.aepona.com with esmtp (Exim 3.13 #2) id 1444Og-0002n1-00 for pgsql-sql@postgresql.org; Thu, 07 Dec 2000 16:59:54 +0000 Message-ID: <3A2FC209.E1EA54D2@aepona.com> Date: Thu, 07 Dec 2000 16:59:53 +0000 From: Karyn Keatley Organization: Aepona Ltd. X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.16-3 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: SQL Query using time Content-Type: multipart/mixed; boundary="------------4BA84DAD44D8FCBB7308D11E" X-Archive-Number: 200012/83 X-Sequence-Number: 414 This is a multi-part message in MIME format. --------------4BA84DAD44D8FCBB7308D11E Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I am attempting to write a sql query that compares times on a 24 hr clock eg 09:00<16:30 and 21:00>16:30 09:00 is the start time and 16:30 is the end time. The problem is that if the start time is 23:58 and the end time is 00:30 (next day) is there any way to carry out this comparison without introducing date. Is it possible to carry out the comparison in the following manner select name from table where 00:12 is between 23:58 and 00:30 thanks karyn --------------4BA84DAD44D8FCBB7308D11E Content-Type: text/x-vcard; charset=us-ascii; name="K.Keatley.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Karyn Keatley Content-Disposition: attachment; filename="K.Keatley.vcf" begin:vcard n:Keatley;Karyn x-mozilla-html:FALSE org: adr:;;;;;; version:2.1 email;internet:k.keatley@aepona.com x-mozilla-cpt:;-15456 fn:Karyn Keatley end:vcard --------------4BA84DAD44D8FCBB7308D11E--