SQL Query using time

From: Karyn Keatley <K(dot)Keatley(at)aepona(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: SQL Query using time
Date: 2000-12-07 16:59:53
Message-ID: 3A2FC209.E1EA54D2@aepona.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Attachment Content-Type Size
K.Keatley.vcf text/x-vcard 218 bytes

Browse pgsql-sql by date

  From Date Subject
Next Message Beth Gatewood 2000-12-07 21:05:56 trying to pattern match to a value contained in a column
Previous Message rocael 2000-12-07 16:03:26 postmaster restart error