List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:March 25 1999 1:19pm
Subject:Re: Date query help?
View as plain text  
Jesse Brown wrote:
> 
> Hello Folks. I am looking for a way to do this in a single query, and I
> was not able to find much enlightenment in the docs, and I was hoping
> someone on the list could help..
> 
> I would like to get the number of entries with START_TIME's (in DATETIME
> format) before the specified date that have END_TIME's (in DATETIME format
> as well) after the specified date. Currently the only way I can think of
> doing it is to fetch each date, convert each to UNIX_TIME, and then do the
> compares. However because subselect's are not implemented yet, this means
> a number of different querys. Any ideas?
> 
> -J
> 
> --
> Jesse Brown [jesse.brown@stripped] - PGP Key ID = C4AB128D

Hi Jesse

How about just using this:
SELECT 
	count(*) 
FROM 
	yourTable 
WHERE 
	START_TIME  < 19990325083159
	AND END_TIME > 19990325083159

Tschau
Christian

Thread
Date query help?Jesse Brown25 Mar
  • Re: Date query help?Christian Mack25 Mar