Solved

How do I search DateTime Data in MS SQL 2005?

Posted on 2007-12-03
1
460 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 250 total points
ID: 20400642
Select * from Board where RegisterDate >='2007-11-28'  and RegisterDate <'2007-11-29'   ---- original date +1
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
insert query with value having 's 2 58
sql Audit table 3 75
T-SQL to Update Table Dynamically 2 57
What is this datetime? 1 20
Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.

820 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