Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do I search DateTime Data in MS SQL 2005?

Posted on 2007-12-03
1
Medium Priority
?
464 Views
Last Modified: 2010-08-05
I am trying to create search page in ASP classic.

How do I create a query that will select similar date?
For Example, when I use this query " Select * from Board where RegisterDate ='2007-11-28' " it gave me a blank result because I didn't input the time.
So I used "Like" query, and it still gives me a blank result.
Select * from Board where RegisterDate Like '%2007-11-28%' "

How do I select the date without inputing time?

Thank you
0
Comment
Question by:erin027
1 Comment
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 1000 total points
ID: 20400642
Select * from Board where RegisterDate >='2007-11-28'  and RegisterDate <'2007-11-29'   ---- original date +1
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question