Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Differences between two dates

Status
Not open for further replies.

JTan

Technical User
Oct 9, 2001
73
SG
hi, I am actually doing a library system for my project. I have to compare the system date with the due date to check whether the book is overdue or not. I tried to use something like:

If Date - Adodc1.Recordset("due_date") > 0 Then
'and the actions that follow if the condition is true

This code works fine when both dates are of the same month only.

Is there a specific built-in function that can help to solve my problem or is there any way to solve it? Any help would be appreciated!
 
try 'DateDiff'...type it in your code, select it then hit F1 to see how to use it.

lightseeker
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top