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.

Adding a month to a timestamp?

Featured Replies

Happy holidays, everybody:

I "get" that when dealing with timestamps you need to add time in seconds to denote a future time or date, e.g., to add a day to a timestamp the calc would be:

Timestamp + 86400

...since 60 (seconds) x 60 (minutes) x 24 (hours) = 1 day

But, how do you add a month since they can be from 28 days to 31 days? In my typical unwieldy fashion, would I create a Custom Function requiring multiple IF/CASE statements where "If it's January add 31 days; February, 28 days (except for leap years)..." etc.? I'm sure there's a _much_ simpler way of coding the calculation, I'm just not seeing it.

TIA for your help!

Try =


Timestamp ( Date ( Month ( timestamp ) + 1 ; Day ( timestamp ) ; Year ( timestamp ) ) ; timestamp )

Edited by comment

  • Author

Brilliant, as usual. Thanks...and congrats on reaching 20,000 posts!

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.