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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

First Day of Last Month 2

Status
Not open for further replies.

wvmbark

Technical User
Feb 12, 2003
135
US
If "=DateSerial(Year(Date()),Month(Date()),1)" returns first day's date of current month, how can I get the date of last month's first day?

Thanks for the help?
 
?dateadd("m",-1,date())-format(dateadd("m",-1,date()),"d")+1
 
Hi!

Try this:

=DateSerial(Year(Date()),IIf(Month(Date())=1,12,Month(Date())-1),1)

hth


Jeff Bridgham
bridgham@purdue.edu
 
MyDate = Date
? Dateserial(Year(MyDate), Month(MyDate), 0)
4/30/03

???????????????




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 

????????????? so solly so saaaad




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top