Re: SQL Between Dates
- From: Roy Harvey <roy_harvey@xxxxxxxx>
- Date: Wed, 13 Sep 2006 12:26:41 GMT
On Wed, 13 Sep 2006 13:14:29 +0100, "@sh" <spam@xxxxxxxx> wrote:
Thanks for your reply Roy, yes DateGiven is a datetime field type, hence the
reason I'm confused as to this not working? Is there any other reason that
I'd get 2003/2004/2005 dates listed? Is there a way that I can force SQL to
read the DateGiven field as a Date subtype? And perhaps force the input
dates to datetime format too?
Cheers, @sh
There is no Date type or subtype in SQL Server. (Don't get me
started!)
What do you get when you test these variations?
SELECT *
FROM SOL_Session
WHERE DateGiven >= '10 Sep 2006'
AND DateGiven <= '13 Sep 2006'
SELECT *
FROM SOL_Session
WHERE DateGiven >= '20060910'
AND DateGiven <= '20060913'
Roy Harvey
Beacon Falls, CT
.
- Follow-Ups:
- Re: SQL Between Dates
- From: @sh
- Re: SQL Between Dates
- References:
- SQL Between Dates
- From: @sh
- Re: SQL Between Dates
- From: Roy Harvey
- Re: SQL Between Dates
- From: @sh
- Re: SQL Between Dates
- From: @sh
- Re: SQL Between Dates
- From: Roy Harvey
- Re: SQL Between Dates
- From: @sh
- SQL Between Dates
- Prev by Date: Re: SQL Between Dates
- Next by Date: Re: SQL Between Dates
- Previous by thread: Re: SQL Between Dates
- Next by thread: Re: SQL Between Dates
- Index(es):