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!

number of days in the month of currentdate-1

Status
Not open for further replies.

crsdev

Programmer
Sep 29, 2006
96
US
hi friends ,
couldn't find the formula to find out the number of days of a particulate month. Is there a formula for this in crystal reports XI.
I wanted something like nofdays(currentdate-1)
Thanks for your help in advance.
 
Of a particular month, or this month?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
thanks for the response dgillz,
I am looking for number of days of the month of currentdate-1.
i.e. if currentdate is Sept-1st it would be number of days of aug=31.
if currentdate is setp-2nd it would be number of days of sept= 30
 
Try this

day(dateserial(year(currentdate-1),month(currentdate-1)+1,1-1))

-lw
 
thanks kskid,
that worked, thought it took me some time to figure out why you did a '+1' after month(currentdate-1).
how did you come up with it. you must be a CR formula guru..

thanks again.
 
You are welcome.

I just became very involved with using dateserial in many of my monthly reports other than lastfullmonth.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top