Solved

How do I search DateTime Data in MS SQL 2005?

Posted on 2007-12-03
1
458 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

919 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now