Date Range query not working. ASP - SQL server

I  have this query calling a SQL server where there are valid End And start dates for each news item. I want to call the items which are valid for today ie. now(). Given to understand that SQL uses the syntax GetDate()...

Here is w2hat I am using.
---------------------------------------------------------------------------------------------------------------------------------
strSQL = "SELECT NewsItem_ID, NewItem_Title FROM tblNewsItems where SubSite_ID = " & NumSiteID & " And GetDate() Is Between NewsItem_StartDate And NewsItem_EndDate;"
---------------------------------------------------------------------------------------------------------------------------------

Any advice, much appreciated.

Kind regards

Abiel m de Groot
LVL 5
Abiel de GrootDeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pratima PharandeCommented:
strSQL = "SELECT NewsItem_ID, NewItem_Title FROM tblNewsItems where SubSite_ID = " & NumSiteID & " And convert(varchar(10),getdate(),101)  Between convert(varchar(10),NewsItem_StartDate,101) And convert(varchar(10),NewsItem_EndDate,101);"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Abiel de GrootDeveloperAuthor Commented:
Hi pratima_mcs,

Many thanks.. that does it.

Spare me a few seconds and explain why that works. Should the dates not be comparable in their current state. What is 101?

It works, but not sure why.

Kind regards

Abbey
Pratima PharandeCommented:
go through this like for  101

http://sqljunkies.com/HowTo/6676BEAE-1967-402D-9578-9A1C7FD826E5.scuk

ans syntax error in Betwen as you entered "IS"
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.