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

Hi all,

I have a date field. I want another field to automatically be the date from this date field + 4 days. However when i do the calculation:

new field = DateField + 4, I get a new date with 4 years more. I guess the date is considered as text. I would also like to add only 4 working days to the date, for example, if my original date is a friday, and i add 4 days to it, the new date field will be Thursday, if we omit saturday and sunday.

Anybody has any idea on how to do that?

Thanks

David

If you have a date field already.

Create a calc DatePlus4 {Format as date]

Date + 4

This will give you the date plus 4 days. Just make sure the calculation is formatted as a date field.

Also this link from the Database pros website (www.databasepros.com)

http://www.filemakerpros.com/WORK.sit for mac

http://www.filemakerpros.com/WORK.zip for pc

as quoted on their site.

quote:


Work Days Tip File

Calculations that eliminate weekdays from date formulas

These calculations are very complex but are one of the only ways to eliminate weekdays from a date formula. One calculation shows how to determine the number of work days between two dates. Another demonstrates how to add a number of work days onto a beginning date. Anyone donwloading this tip should be familiar with the Position function. (25k)

HTH

  • Newbies

Try this:

Use 3 fields: DATE FIELD (formatted as date).

DATE+4 (calculation formatted as date).

DAY CALC (calculation formatted as date).

DAY CALC = Day of Week (DATE FIELD).

DATE+4= Case(DAY CALC=1,DATE FIELD+5, DAY CALC=2,DATE FIELD+4,DAY CALC=3,DATE FIELD+6,DAY CALC=4,DATE FIELD+6,DAY CALC=5,DATE FIELD+6,DAY CALC=6,DATE FIELD+6,DAY CALC=7,DATE FIELD+5,"").

DAY CALC calculates the day of the week for DATE FIELD and assigns it a number: Sun=1, Mon=2, etc..

DATE+4 now "skips" the weekend by accounting for them in the date equation. It even "skips" the weekend when your DATE FIELD date starts on a weekend day.

Good Luck!

Lets throw in another problem that may arise in this then.

What about holidays. Public holidays is it. Like 4th July, Christmas etc. (bank holidays here in the uk.) You know, where you get a monday or friday off of work with the rest of the country to go and be merry.

How are you going to trap for these (if you want to that is).

quote:

Originally posted by Andy Gaunt:

Public holidays is it. Like 4th July ... (bank holidays here in the uk.)

The 4th of July is a bank holiday in the UK?!?!?!?

Go figure.

Dan,

Where by you come to this conclusion!!!!

We don't celebrate the 4th July.

Definitely not a bank holiday here!

But, try to figure the code to calculate for these such holidays. I mean, if you want a true work day count that is.

  • Newbies

Good point, Andy

Since we

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.