Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hi all,

Just a newb question here - I need to take a date and calculate 10 weeks on from it automatically. If the day turns out to be a weekend it should automatically round off to the next Monday.

Any ideas how I need to do this? Some of the solutions on here are a little intricate for what I need for this!

Thanks in advance for your kind assistance.

Rgds

Posted

Assuming 7 days a week which we will because you haven't stated there aren't, something like the following should work:

Get(CurrentDate) + 70 + Case( DayName(Get(CurrentDate)) = "Saturday" ; 2 ; DayName(Get(CurrentDate)) = "Sunday" ; 1 )

... or if you want to use something other than the current date use the below and replace get(currentDate) with your date field / value:

Let( x = Get(CurrentDate) ;

x + 70 + Case( DayName(x) = "Saturday" ; 2 ; DayName(x) = "Sunday" ; 1 )

)

Posted

That is fabulous! Thanks for the assists there. Interesting point about the language, but as luck would have it I am using English in this db.

Many thanks!

Posted

as luck would have it I am using English in this db.

It's a matter of good practice. Hopefully, one day your solution will be a world-wide success - and THEN you'll wonder why it doesn't work for some.

Posted

I wouldn't use DayName() for this, because it will break if the language is not English:

Fair call.

  • 1 month later...
Posted

Hi there

I have finally got around to giving this a go and it just isn't working for me. I get a load of errors stating that either the GET function will not work or else there are missing parameters. I followed the instructions so am a bit baffled.

I would like this to be a script rather than a calculation as I want more control over when it is calculated.

Thanks for your help.

This topic is 5773 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.