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

x
?
Solved

Set sql statement for Date

Posted on 1998-08-19
4
Medium Priority
?
151 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 100 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

Technology Partners: 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 While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

824 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