Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4207 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Just wondering, for all you geniuses out there.... I have come across a spreadsheet conversion project to FM12 and in a formula on the spreadsheet they  "Exclude Sundays" as a workday,

 

So, if a job was scheduled (i.e. Calendar drop down) and it fell on a sunday, the script would "Bump it" a day, to never fall on a sundays..... hope that makes sense.....

 

Is this easy to do with FM?

 

Thanks

 

-sr

Posted

This calculation will return the original $date if it isn't a Sunday, or the following Monday if $date is a Sunday.

If ( DayOfWeek ( $date ) = 1 ; $date + 1 ; /* Else */ $date )

To apply this to a date field at all times, including imports from your Excel files and user data entry, you could substitute Self for $date and use it as an auto-enter calculation on that field with the "Do not replace existing values" option turned off:

If ( DayOfWeek ( Self ) = 1 ; Self + 1 ; /* Else */ Self )
Posted

So, I would just put the syntax like you have it in a Auto Entry Calculation on that date field?

 

Like -  If ( DayOfWeek ( $date ) = 1 ; $date + 1 ; /* Else */ $date

 

and thats it?

 

sounds to good to be true hahaha!!!

 

Thank you

 

I will give it a whirl.....

This topic is 4207 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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