Figuring out Days in a month

G

Guest

One would never know I got an A in my Access classes!

I need to figure out the number of days in a month, based on a given date.
So if the date in the table is 2/27/04, I need to know that there are 29 days
in that particular month.

Thanks in advance!
 
D

Douglas J Steele

Day(DateSerial(Year([MyDateField], Month([MyDateField]) + 1, 0)) will return
the number of days for whatever month's in MyDateField
 
G

Guest

BRILLIANT! Works perfectly in the query! THANK YOU!
--
Never give up, the answer IS out there, it just takes a while to find it
sometimes!


Ofer said:
Try this

Day(DateSerial(Year([DateFieldName]),Month([DateFieldName])+1,0))

--
\\// Live Long and Prosper \\//
BS"D


Larry G. said:
One would never know I got an A in my Access classes!

I need to figure out the number of days in a month, based on a given date.
So if the date in the table is 2/27/04, I need to know that there are 29 days
in that particular month.

Thanks in advance!
 

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