How can I get the last day of the month in progress 4gl?
/* the last day of this month is one day less than the first day of next month
*
* so add one month to the first day of this month and then subtract one day.
*
*/
function lastDay returns date ( input d as date ):
return add-interval( date( month( d ), 1, year( d )), 1, "month" ) - 1.
end.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With