You are here: Re: SQL Between Dates « MsSQL Server « IT news, forums, messages
Re: SQL Between Dates

Posted by Roy Harvey on 09/13/06 12:26

On Wed, 13 Sep 2006 13:14:29 +0100, "@sh" <spam@spam.com> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация