SOLVED
Convert dates to last day of given month
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
jamesbodolay
7 - Meteor
‎07-27-2023
09:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello. I have a column containing various dates, all of which are the first day of the month. For example, I have dates such as 2023-01-01, 2026-01-01, 2025-04-01, etc. I would like to convert these dates to the final day of their given months - ie, 2023-01-01 would become 2023-01-31. What is the best way of accomplishing this? I am working on Designer x64. Thank you.
Solved! Go to Solution.
Labels:
- Labels:
- Date Time
2 REPLIES 2
12 - Quasar
‎07-27-2023
10:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @jamesbodolay ,
I would add one month to my date, then subtract one date from that. So, for the '2023-01-01' example you'd add one month, resulting in the date '2023-02-01'. Subtracting one day from that will then get you '2023-01-31'
This formula should do the trick:
DateTimeAdd(DateTimeAdd([Date],1,'month'),-1,'day')
Rana_Kareem
9 - Comet
‎07-27-2023
10:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
