Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I hope you all are having a great day!
I have a column (eg: 2021001) from which I can extract year and month.
And I would like to get the last day of Jan 2021 like 01/31/2021.
Is there a way to get the last date of the month from Year and Month?
Thank you!
ok, then try this, replace in brackets your extraction logic.
date(monthend(makedate(<year>, <month>)),'MM/DD/YYYY')
monthend() will give you this.
you need to pass a date into this. you can use date# to convert your string to a date:
date(monthend(date#('20210102', 'YYYYMMDD')),'MM/DD/YYYY')
Hi,
the data I have is not date. I can only extract Year and Month from it.
ok, then try this, replace in brackets your extraction logic.
date(monthend(makedate(<year>, <month>)),'MM/DD/YYYY')
Thank you!
I was able to use similar formula to solve the issue.
MonthEnd(MakeDate(Num#([Year_Col]), Num#(Right(MaxString(Col_2), 2))))
Great. Yes that's the same thing i posted only i wrapped in a date function at the end.