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.

Update month with calculation

Featured Replies

  • Newbies

I created a simple database to track my customers and have all functions working as required--except one. What I have is a payment field and a and a due date field. What I want is when I enter the payment amount the month in the date field is incremented by a number in the calc field. The formula I used was Payment/monthly amount + Month(due date) but with formula I get some strange results in the Payment due date field. Any suggestions.

Hi Alex,

Try this as the calculation with a ( date result ):)

Date ((Payment/monthly amount + Month(due date));day(due date);year(due date))

I suspect the problem is with type missmatching. I assume your result field is a date type, however Month(date) returns a number type. This would probably result in a date somewhere in the year 1900. Filemaker does math with dates as a number representing the number of days since 1/1/1900. Working with date fields can get tricky until this logic becomes clear to you.

Hang in there.

Tim

  • Author
  • Newbies

This was first attempt at a filemaker database, it was a lot more daunting than I thought. But thanks to this forum and a lot of reading the help files and special thanks to Tim, all was accomplished. If thanks were gold you would be a rich man Tim--Thanks again.

Filemaker does math with dates as a number representing the number of days since 1/1/1900

A small (but important) point ... Filemaker's first date is Jan 1, 0001 and days are numbered from there. :wink2:

Also, drop the slash from between Payment/Monthly Amount. Any calculations based upon this field will FAIL (it is invalid) and FM should have told you so when you created it. Also, if you have no due date, you will receive ? in the field. Instead, I would write the calculation as:

If ( due date ; Date ( Month ( due date ) + PaymentMonthlyAmount ; Day ( due date ); Year ( due date ) ) )

Ahmmm... the way I understand it, it is actually a division. You divide the total charge by the monthly installment, and that should give you the number of installments. Strictly speaking, it should be:

Date ( Ceiling ( Sum / Payment ) + Month ( StartDate ) ; Day ( StartDate ) ; Year ( StartDate ) )

in case the division leaves a remainder.

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.