?
Solved

Retrieving records from ms access for specific dates

Posted on 2009-05-04
1
Medium Priority
?
189 Views
Last Modified: 2012-05-06
Given an MD Access DB with records containing a date, how can retrieve the records for a specific date?  I know how to use the dateadd function to pull the records using the (-) days approach.  

I want to pull records for the past 24 days, one day at a time.  How can I do that?

for rw as integer =24 to 0 step -1
 sql="select * from history where type='cycle' and cycle_date = '" & ???????
next

Any ideas?
0
Comment
Question by:ddepuemd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
ddepuemd earned 0 total points
ID: 24294963
Nevermind, I found my answer by doing this:

sql = "select * from cycle_history where cycle_type='cycle' and job_number='" & jobno & "' and cycle_time >= dateadd(""d"",0,#" & Now.Date.AddDays(-dy) & "#) and cycle_time < dateadd(""d"",0,#" & Now.Date.AddDays(-dy + 1) & "#) order by cycle_time desc"
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

800 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