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.

Auto Enter Date to Skip Weekend

Featured Replies

Is there a formula I can use that when run will calculate a date, but if the date falls on a weekend it will oush the result to the next weekday.

Example I want to set an "Order_due" field to be current_date+7. If I create that record today order will be marked as due next sunday (a non work day) but would like the result to show as Monday the 26th?

Thanks in advance for any help.

Steve

PS I love the calendar function in the new version!

the way id do it is fairly simple... using a static order period of 7 days though you could just as easily make it dynamic...and a field called OrderDate.. i.e. the date the order is placed and a field called OrderDue and one called OrderDueDisplay so as not to clutter the OrderDue Calc...

FIELD: OrderDue (Calc with result date)

Case (DayName (OrderDate + 7) = "Saturday"; OrderDate + 9;

DayName (OrderDate + 7) = "Sunday" ; OrderDate + 8 ;

OrderDate + 7)

FIELD: OrderDueDisplay (Calc with result text)

DayName ( OrderDue ) & " " & Day ( OrderDue ) & " " & MonthName ( OrderDue )

Genx

the way id do it is fairly simple

That doesn't seem very simple... How about this one by Queue:

Let (

dueDate = OrderDate + 7

;

dueDate + Position ( "17" ; DayOfWeek ( dueDate ) ; 1 ; 1 )

)

There's no need for a second field - you can format a date field to display any way you like.

...meh, i never was that great with the scripting, while your at it though, would you mind explaining the position script step?

Cheers, Genx

First, there's no script here, only a calculation. Position() is a function, not a script step.

DayOfWeek() returns 1 for Sunday, 7 for Saturday.

The position of "1" in the string "17" is 1, so if dueDate is Sunday, 1 is added to it.

lol yeah, and i never like the terminolgy either, nor do i generally pay much attention to what im typing :, cheers for the explanation.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

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.