Make a Date
DateDiff finds the
difference between two dates. Microsoft Access uses Now() for
the current date. The code looks like this:
DaysRented: DateDiff("d",[DateRented],Now())
Where DaysRented is a Label
DataDiff() is the function
d is the time
interval
[DateRented] is a field in tblMovieRented
Other DateDiff intervals are:
Month m
Year yyyy
Week ww
Hour h
Minutes n
Try it: Calculate the Date
Open rptCustomerReceiptSQ in Design View.
Insert a new column into your query.
Type
the DateDiff code:
DaysRented: DateDiff("d",[DateRented],Now())
Test your results and Save the query.