Reputation: 2455
I have two columns in a table (Access DB):
I would like to define a third column in a table which calculates the difference in days taking the difference between the above mantioned dates. What is the best practice to do this in Access?
Thank you!
Upvotes: 0
Views: 209
Reputation: 320
Using SQL:
Select [{YourTableName}]![Open_Date]-[{YourTableName}]![Closed_Date]
as {whatever you want to name the calculated field} from [{YourTableName}];
Upvotes: 2
Reputation: 55806
Use a query:
Select
Open_Date,
Closed_Date,
DateDiff("d", Open_Date, Closed_Date) As Days
From
YourTableName
Upvotes: 2