[SOLVED] Find last day of given month

How can I change a date to the the last date of the given month? For example, if a user inputs 3/28/18 I want to change that to 3/31/18

The only idea I could come up with was to create a data table with each month and corresponding last day and looking up off of that table. Seems messy though. Must be a simpler way. Any ideas?

Thanks!

2 Likes

Hi @geoff.byron

I think what you want is to use the date modifiers to add one month to the date, then change the date to 1 and then add days -1.

8 Likes

This is what I’d do too. “Input’s value +(months) :1 :change date to 1 +(days): -1”

10 Likes

Great idea, thank you both!

This topic was automatically closed after 70 days. New replies are no longer allowed.