B
B
Boris Belov2015-04-28 12:23:15
SQL
Boris Belov, 2015-04-28 12:23:15

How to subtract the given date from the current date in Access (in Sql mode)?

You need to create a query in Access that would calculate interest according to deposit accounts. For the calculation, it is necessary that the date of opening the account be subtracted from the current date in order to obtain the value of the months and substitute them into the corresponding formulas for calculating interest on deposits for the current date.
For example:
[DepositAccount]![Amount]*(1+[Account Type]![Percentage]*(CurrentDate(month)-[DepositAccount]![OpenDate](month))/(30*100))
How to write this in Sql ? Since the Access expression builder does not count this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boodmoo, 2015-04-28
@iborisbelov

DATEDIFF
select DATEDIFF(MM, '2014-09-28 15:10:46.813', getdate())

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question