List:General Discussion« Previous MessageNext Message »
From:Karl J. Stubsjoen Date:July 1 2003 5:28pm
Subject:Re: Date query optimization
View as plain text  
Keith,

> The normal way to do a search for a range of dates would be
>
>    ... WHERE a.submitdate BETWEEN '2003-07-01' AND '2003-07-14';
>
> Is that what you're looking for?

submitdate happens to be a DATETIME field.
Your suggested query doesn't pull any results.  Must I convert the field
first?  But then is my query unoptimized?  Should I consider storing date
parts into my database; seperate column for year - month - date and (time
parts..)

Karl

Thread
Date query optimizationKarl J. Stubsjoen1 Jul
  • Re: Date query optimizationKeith C. Ivey1 Jul
    • Re: Date query optimizationKarl J. Stubsjoen1 Jul
      • Re: Date query optimizationKeith C. Ivey1 Jul
  • RE: Date query optimizationRick Robinson2 Jul