I have a table that has a datefield and acctType. I am currently able to query the number of accounts opened for the current month as follows.
DATENAME(month, DateOpend) and in the criteria field = DATENAME(month, GETDATE()). This would give me the accounts for the current month.
How do i get the number of accounts opened for the last month. This is the closest i could get
= DATENAME(month, GETDATE()-30) But then this is not good as we may have months less than or greater than 30.
Any advise
Dwight
DATENAME(month, DateOpend) and in the criteria field = DATENAME(month, GETDATE()). This would give me the accounts for the current month.
How do i get the number of accounts opened for the last month. This is the closest i could get
= DATENAME(month, GETDATE()-30) But then this is not good as we may have months less than or greater than 30.
Any advise
Dwight