Skip navigation

New Calculation Function - EOMONTH

score 123
You have not voted. Active

It would be nice if there was an EOMONTH function like in Excel to determine the last day in the month. This is helpful to determine the number of days in a month, the percent of month from specified date, or any number of other possible uses. I'm using a workaround to divide a monthly budget by the number of days in the month.


Here is my workaround if anyone is interested:


          STR(DATEPART('month',date(str(DATEPART('month',[ServiceDate]))+'/25/'+ str(DATEPART('year',[ServiceDate])))+10))  //Next month

          + '/1/'+ //First of Month

          STR(DATEPART('year',date(str(DATEPART('month',[ServiceDate]))+'/25/'+ str(DATEPART('year',[ServiceDate])))+10))) //Year of next month

     -1 //Subtract 1 from the first of next month to get the last day of the current month.


Vote history