Microsoft Access - Query Expression to find what calendar date a monday is
-
I have a table that has a field that lists the first monday of each week. So there might be records as follows, 12/30, 1/6, 1/13. I would like to find an expression I can place in a query that will determine the date for the monday of the current week. So for example, this week it would return 12/30. This way I could know which records belong to this week. Secondly, I would like to be able to have it determine the monday for the next week, the week after that ecetra (how I would manipulate the form to return this value) Thanks for your assistance.
-
Answer:
Hi cheaptrinkets-ga, Solving the problem you've described requires an SQL query, but before we can use that we need a table to test the query. I have created one that looks like this (where the name of the table is "Dates"): Monday | Notes 30/12/2002 Text A 06/01/2003 Text B 13/01/2003 Text C Now that we have something to work with, let's consider the problem. Since your table is structured so that entries are only made for each week, we can use the following query to obtain the row for that week: SELECT * FROM Dates AS D WHERE (D.Monday <= Date()) And (D.Monday > Date()-7) Clearly, the key to solving this problem lies in the Date() function, which returns today's date (based on your Windows clock). Another helpful component is that dates can be compared using the <, >, and = operators. In order to put this into Access, simply create a new Query, go to the SQL View within that query, and replace whatever is in there with the above statement. I hope that answers your question, but if you have any problems understanding the information above please feel free to post a clarification :) Cheers! answerguru-ga Google Answers Researcher
cheaptrinkets-ga at Google Answers Visit the source
Related Q & A:
- How to convert my SQL query to MS Access query?Best solution by Stack Overflow
- What does make a good on a first date?Best solution by Yahoo! Answers
- What is the best way to find new members for a yahoo group?Best solution by Yahoo! Answers
- Is there a free program like Microsoft Access?Best solution by wiki.answers.com
- How do I find out what happened to a house?Best solution by ChaCha
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.