Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

first and last day of month -1 1

Status
Not open for further replies.

2009luca

Programmer
Jul 27, 2013
222
IT
Based the current date how to calculate the furst and last day of month -1?

Example:
now
14/03/2014

calculate first and last day of febrary.

Tks.
 
hi,
Code:
dFirst = DateSerial(Year(Date), Month(Date)-1, 1)
dLast = DateSerial(Year(Date), Month(Date), 1)-1


Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top