Page 1 of 1

Return the last day of the current month

Posted: Thu Jul 30, 2015 2:12 pm
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

Re: Return the last day of the current month

Posted: Fri Jul 31, 2015 1:29 pm
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.