How to make the Potential Closing date be the end of the month automatically?

How to make the Potential Closing date be the end of the month automatically?

You need to create a new custom field - formula field to “complement” Closing Date (the standard Closing Date is required and can’t be hidden) and use the following formula: Newdate(Year(${Potentials.Closing Date}),Month(${Potentials.Closing Date}),If(Or(Month(${Potentials.Closing Date})==1,Month(${Potentials.Closing Date})==3,Month(${Potentials.Closing Date})==5,Month(${Potentials.Closing Date})==7,Month(${Potentials.Closing Date})==8,Month(${Potentials.Closing Date})==10,Month(${Potentials.Closing Date})==12),31,If(Or(Month(${Potentials.Closing Date})==4,Month(${Potentials.Closing Date})==6,Month(${Potentials.Closing Date})==9,Month(${Potentials.Closing Date})==11),30,28)),11,59,'PM') As you can see it is relatively crude but this is the only way to do it. 

Note also that I ignore the 29 Feb in leap year scenario. Easy to add but makes the formula a lot more complex so for one day every 4 years I didn’t think it worth the effort.