Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i need to subtract 1 month to my date,
in my variable date i have always the last day of the month
soi see if in my variable date have for example 28/02/2018 with the expression:
AddMonths(Date($(vFineMonthContrAltAnnoTempo), 'DD/MM/YYYY'),-1)
it show me 28/01/2018.. but is wrong i need to show the last day of the month so 31/01/2018 when i subtract -1
so if i have in the variable 30/06/2018, when i do the expression AddMonths(Date($(vFineMonthContrAltAnnoTempo), 'DD/MM/YYYY'),-1)
i want to show 31/05/2018 and not 30/05/2018
how can i do that?
thanks
Try this:
MonthEnd(AddMonths(vFineMonthContrAltAnnoTempo, -1))