Date calculation
Application Type
Traditional Web

Hi Everyone,

      I want to find the Last date of the next month. Is there any simple way to find it.

Ex: 

current month is October.. I want the 2021-11-31.

Solution

Hi ,

Please try this -  AddDays( AddMonths( NewDate( Year(CurrDate()), Month(CurrDate()), 1 ), 1 ), -1 )

#Refer post - https://www.outsystems.com/forums/discussion/52522/inputs-with-start-date-and-end-date-of-the-current-month/

Thanks,

Vani

Hi,

First step, we can get the first date for Current Month, AddDays(CurrDate(),-Day(CurrDate())+1), 2021-10-01

Second step, we can get the first date for Next Next Month, AddMonths(AddDays(CurrDate(),-Day(CurrDate())+1),2), 2021-12-01

Last step, we can get the resutl we want, the Last Date Of Next Month, AddDays(AddMonths(AddDays(CurrDate(),-Day(CurrDate())+1),2),-1) 2021-11-30


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.