Return the last day of the current month

Stimulsoft Reports.WEB discussion
Post Reply
naubert
Posts: 1
Joined: Thu Jul 30, 2015 2:07 pm

Return the last day of the current month

Post by naubert »

Hi All,

I am new to this forum and i need some help. I am trying to create a SumIf function if one data in my data band is greater than the last day of the current month. If it is true then return a secific data, if false return 0.
Finally, in my groupfooter, I want to calculate the sum of this sumif funtion.

Any help or guidance to achieve that would be grateful!

Thanks in advance.
Nico
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Return the last day of the current month

Post by HighAley »

Hello, Nico.

You can get the last day of the current month with DaysInMonth method. Here is sample code:

Code: Select all

new DateTime(Today.Year, Today.Month, DateTime.DaysInMonth(Today.Year, Today.Month))
Thank you.
Post Reply