Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
beck_bakytbek
Master
Master

last day and not last day

Hi Folks,

i got a situation where i have my Datafield for instance:

14.06.2017

16.06.2017

30.06.2017

how can i determine the last day in each month, i want to achieve this results:

14.06.2017 - not last day

16.06.2017 - not last day

30.06.2017 - last day

Does have anybody any idea?

Thanks a lot

for your feedback

Beck

16 Replies
beck_bakytbek
Master
Master
Author

Hi Anand,

thanks a lot for your feedback,

my issue is: if i find the last day of month, then i want to add one month, for instance:

if i find: 31.03.2017 then = 30.04.2017

but in the case of feb i have a deviation: 28.02.2017 = 28.03.2017 the right result would be: 31.03.2017

Do you have an idea?

Beck

antoniotiman
Master III
Master III

Replace AddMonths with MonthEnd

Date(MonthEnd(Datum,1))

beck_bakytbek
Master
Master
Author

Thanks a lot Antonio for your help

Beck

its_anandrjs

Ok then try this first find Monthend and then Addmonths to one month MonthEnd( AddMonths([Date Field],1) ) and rest are ok.

If(Floor([Date Field]) = Floor([Month End]), MonthEnd( AddMonths([Date Field],1) ),[Date Field]) as NewDateField

its_anandrjs

Is this you required.

Img8.PNG

beck_bakytbek
Master
Master
Author

Thanks a lot Anand for your help

Beck

its_anandrjs

Welcome Beck