Home sql Data Selection Request in MS Access

Data Selection Request in MS Access




Please tell me how in MS Access using SQL request to create a request to select dates about today’s date?
For example, there is a table contact. It has a date_nity attribute. And we need to make a request that will bring fields that will be a birthday within the next two days, regarding today’s date. (In general, such as this aircraft in contact)

Answer 1, Authority 100%

select *
  From [Contacts]
  Where [Details] IS NOT NULL
    And dateadd ("yyyy", datediff ("yyyy", [Detament], date ()), [Details]) Between Date () and Dateadd ("D", 2, Date ())

Answer 2

select my_date
 From mytable
 Where My_Date & GT; = # 2016-03-30 00: 00: 00 #
    And my_date & lt; # 2016-04-02 00: 00: 00 #;

Hence took

Answer 3

Thank you all, but helped me this code:
SELECT date_name
From contact_litsa
Where Between Date () and Dateadd (“D”, 2, Date ());

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions