I IanT Registered User. Local time Today, 13:29 Joined Nov 30, 2001 Messages 191 Aug 23, 2005 #1 I have a field containing a date ie 25/05/2005. How can I calculate the number of days in the month ie March 2005 = 31 days!
I have a field containing a date ie 25/05/2005. How can I calculate the number of days in the month ie March 2005 = 31 days!
B Bat17 Registered User. Local time Today, 13:29 Joined Sep 24, 2004 Messages 1,687 Aug 23, 2005 #2 intDays = DateSerial(Year(dDate), Month(dDate) + 1, 1) - DateSerial(Year(dDate), Month(dDate), 1) where dDate is your Date HTH Peter
intDays = DateSerial(Year(dDate), Month(dDate) + 1, 1) - DateSerial(Year(dDate), Month(dDate), 1) where dDate is your Date HTH Peter
RuralGuy AWF VIP Local time Today, 06:29 Joined Jul 2, 2005 Messages 13,819 Aug 23, 2005 #3 Day(DateSerial(Year(YourDate), Month(YourDate) + 1, 0)) Day '0' in DateSerial() gives you the last day of the previous month.
Day(DateSerial(Year(YourDate), Month(YourDate) + 1, 0)) Day '0' in DateSerial() gives you the last day of the previous month.