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.

Day of Week help

Featured Replies

Im trying to run what I assumed was a simple If statement.

I have a start date and end date and I'm creating records for all dates that are Mon-Fri, doing a check before each loop iteration based on the following:

If[(not DayofWeek ($Date) = 1) or (not DayofWeek($Date) = 7)]

then go ahead through the part of the loop that creates the daily record. If it fails that it goes to the part of the loop that increments $Date by 1 day.

No matter what value DayofWeek ($Date) returns it fails that if statement and goes straight to incrementing $Date.

I tried switching to a ≠ without the not and it will pass the if statement every time.

Am i missing something here?

1. The not operator is evaluated before the = comparison. Instead of:

not this = that

use:

not ( this = that )

which is the same as:

this ≠ that

2. You are using 'or' where 'and' is required.

  • Author

Thanks for setting me straight

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.