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.

Featured Replies

I have a StartDate (date) and a Frequency (text) field. I want to calculate the dates of the next upcoming frequencies based upon perspective of today. Weeks, Months, Quarter, Biannual Triannual and Yearly. I know how to get these results but not based upon today. Seems I have to first compare where I am relative to the StartDate.

The current StartDates are several years old and need to stay.

Weekly: start date is 1/7/2000 so Friday. Today is Friday (and can't count) so it should produce 4/27/2012.

Monthly: start date is 1/1/2000 and today is 4/20/2012 so it should produce 5/1/2012.

Triannual: start date is 2/15/2000 the next would be 6/15/2012 (sorry, I had put biannual and I meant triannual)

Quarter: start date is 1/15/2000 the next would be 7/15/2000 since 4/15/2012 has passed

If the date result IS today, it should jump forward to next period. I guess I'm a bit tired. Help through it would be appreciated.

ADDED: BTW, some consider triannual to be an invalid definition so to explain ... triannual means every four months.

Edited by LaRetta

Hint: when is my next birthday?

To be more specific:

WEEKLY =

StartDate + 7 * ( Div ( Get ( CurrentDate ) - StartDate ; 7 ) + 1 )








N-MONTHLY =




Let ( [

today = Get ( CurrentDate ) ;



elapsedMonths = 12 * ( Year ( today ) - Year ( StartDate ) ) + Month ( today ) - Month ( StartDate )

- ( Day ( today ) < Day ( StartDate ) ) ;



elapsedIntervals = Div ( elapsedMonths ; N )

] ;

Date ( Month ( StartDate ) + N * ( elapsedIntervals + 1 ) ; Day ( StartDate ) ; Year ( StartDate ) )

)

  • Author

Your hint did the trick and I performed a forehead slap! My resulting calcs were not as pretty (or efficient) as yours (and those two should DO replace all of mine as well) ...

Thank you! :laugh2:

I never cease to be amazed at your date-function capabilities. LOL. I love the multiplicity of this! What a nice wake-me-up!

Edited by LaRetta

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.