Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Calculate the date for the last day of the previous month

Featured Replies

I'm looking for a simple calculation for the date of the last day of the previous month, based on Get(CurrentDate)?

I can use month(get(CurrentDate)-1, but wondered if there is an easy way to calculate this, other than a complex calculation for the day, based on 28, 29, 30, 31 days in the given months?

Thanks,

 

Bill

8 minutes ago, Bill_misc_IT said:

wondered if there is an easy way to calculate this

Here's one:

Let ( 
today = Get ( CurrentDate )
;
today - Day ( today )
)

Here's another:

Let ( 
today = Get ( CurrentDate )
;
Date ( Month ( today ) ; 0 ; Year ( today ) )
)

 

  • Author

That's what I was looking for.  Day "0" goes back to last day of previous month...got it.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.