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!

how can you know the number of days of a certain month? 1

Status
Not open for further replies.

AxeaXeaxE

Programmer
Apr 22, 2002
21
NL
Is there some sort of syntaxis for? I can't find it.
 
It's a bit of a workaround but you can use teh EOMonth function - EOMonth gives the serial number of the last day in the same month (providing arg 2 = 0)
EOMonth("01/01/01",0) retuens the serial number for 31/01/01
therefore =(EOMonth(serialnumberfor1stofmonth,0)-serialnumberfor1stofmonth)+1 ('cos you're starting on day 1)
will give the number of days in a month
HTH
Geoff
 
Hi,

Try this...
Code:
=DAY(EOMONTH(J6,0))
:)
Skip,
metzgsk@voughtaircraft.com
 
Nice one skip - much better than mine - have a star
Geoff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top