Skip 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.

Calc First Day of Previous Month

Featured Replies

My brain is foggy today and am reaching out for help.

How do I calculate the date (dd/mm/yy) for the first day of the month previous to the current date?

Examples:

Current Date = 6/12/08 Result 5/1/08

Current Date = 1/20/08 Result 12/1/07

I will be writing a script to find all the records in my database for the previous month. I have found custom functions for calculating the last day of the previous month but am stumbling on the best way for getting the first day of the last month.

Thanks to all who reply

Rich :)

Date ( Month ( Get (CurrentDate) ) - 1 ; 1 ; Year ( Get (CurrentDate) ) )

I have found custom functions for calculating the last day of the previous month

Custom function is not required for this either.

Date ( Month ( Get ( CurrentDate ) ) ; 0 ; Year ( Get ( CurrentDate ) ) )

or even ...

Get ( CurrentDate ) - Day (Get ( CurrentDate ) )

  • Author

I knew this would be simple. Thanks!!

:)

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.