Click here to Skip to main content
15,920,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am using msaccess database (i want to check expiry date of those medicine which had to expired within one month )
Posted
Comments
Nelek 27-Nov-13 4:25am    
Perfect, go ahead.

Since you didn't ask any question, it is difficult to give you a better answer.

I strongly recommend you to read:
How to ask a question[^] and What have you tried?[^]
Maciej Los 27-Nov-13 4:26am    
What's the problem?

MS Access uses DateDiff()[^] function ;)

SQL
SELECT ProductName
FROM Products
WHERE DATEDIFF("m", Now(), ExpiryDate) >1 


For further information, please visit: Tips and Techniques for Queries in Access[^]
 
Share this answer
 
Since you have not posted any code I am posting a logic using query. I have not tried this query hence it may have syntax error.

Select * from medicine where expiry_date between Date() and DateAdd ("m", 1, date())
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900