returning a date value

  • Thread starter Thread starter Guest
  • Start date Start date
How can I return a number of days in a given month

DateDiff("d", DateSerial(Year([enter a date:], Month([enter a date:],
1), DateSerial(Year([enter a date:], Month([enter a date:] + 1, 0)
 
If you want the current month:

?Day(DateSerial(Year(Date()), Month(Date()) + 1, 0))
31

If you want the number of days of the month of a specific date, replace
Date() with the input date.
 
Back
Top