Access – VBA – Calculating the first and last day of the month

Ever needed to calculate the first and last day of the month? Here's an expression that can be used in Access:

DateSerial(Year(Now), Month(Now) + 1, 0) - Last day of month
DateSerial(Year(Now), Month(Now), 1) - First day of month

Alternative

DateSerial(Year(date()), Month(date()) + 1, 0) - Last day of month
DateSerial(Year(date()), Month(date()), 1) - First day of month
SOURCE

LINK (Dbageek.blogspot.com)

LANGUAGE
ENGLISH