Solved

Set sql statement for Date

Posted on 1998-08-19
4
143 Views
Last Modified: 2010-04-30
Is there any way to 'select' all record with particular date value, without specifying the time value ?

I have tried with the following command :

Select * from db1 where mydate like "12/11/1998"

but it always fails (no result return). I guess it's because I didn't use the complet date format, including the time portion.

For examples : I want to list all records with date value "1 january 98", how the sql statement should be ?
0
Comment
Question by:asiasoft
  • 2
4 Comments
 
LVL 14

Expert Comment

by:waty
ID: 1429817
You have to include the dates between #.

Select * from db1 where mydate = #12/11/1998#
0
 

Author Comment

by:asiasoft
ID: 1429818
Sorry Waty, I have tried that way and still not working.

thanks

0
 
LVL 4

Accepted Solution

by:
mcix earned 50 total points
ID: 1429819
SELECT * from DB1
WHERE
mydate Between #1/1/98# And #1/1/98 11:59:00 PM#
0
 

Author Comment

by:asiasoft
ID: 1429820
Well, actually I hope there would be simpler way than that way. Anyway, thanks for the answer
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

759 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

18 Experts available now in Live!

Get 1:1 Help Now