Solved

Set sql statement for Date

Posted on 1998-08-19
4
144 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

911 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

23 Experts available now in Live!

Get 1:1 Help Now