How to calculate nr of days of 2 given months.

L

Linda

Is there an easy way to calculate the nr of days of 2
given months. For example months; JAN - FEB.

How do you find out the total nr of days for these 2
months? Is there a function in Microsoft Access that does
that.

Many thanks for any tips or suggestions.
 
D

Douglas J. Steele

To find the number of days in a given month, use Day(DateSerial(year, month
+ 1, 0))

In other words, for the number of days in January, use
Day(DateSerial(2004,2,0)) and for the number of days in February, use
Day(DateSerial(2004,3,0)). And yes, Day(DateSerial(2004, 13, 0)) will work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top