SOLVED
How to get the date last 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
herbert1682
6 - Meteoroid
‎01-04-2024
10:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi I need to add the date for last month the month and the year I usually do a manual and type in the month (12) and year (2023).
Solved! Go to Solution.
Labels:
- Labels:
- Topic of Interest
2 REPLIES 2
cjaneczko
13 - Pulsar
‎01-05-2024
05:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can use these two formulas to get the Year and the Month for last year. You can combine the two into one formula box if you need to concatenate them in anyway. This is Dynamic, do if you are in February it should still return December of 2023 no matter which day you run the report this year. If you need it to only show you the prior month, you can remove this: "-DateTimeMonth(DateTimeNow())" and update it to "-1".
Year
Datetimeyear(DateTimeAdd(DateTimeNow(),-DateTimeMonth(DateTimeNow()),'month'))
Month
Datetimemonth(DateTimeAdd(DateTimeNow(),-DateTimeMonth(DateTimeNow()),'month'))
‎01-05-2024
03:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Looking at Capture 3 this works!
