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 5266 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Probably a newbie question... because I am, and I am looking for an easy answer.

I have a begin date and an end date field, but I want to have the entries that are made in these two fields return the Week Begin Date and End Date to their respective fields.

Now to the books.

Thanks in advance for any support.

Posted

Not sure exactly what you want here but I use this formula to get the first day of the week:

FirstDayOfWeek = CurrentDate - DayOfWeek(CurrentDate) +1

Make sure your calculation returns a date. You can tweak this to get different days of the week.

Posted

You are right, it isn't really clear what the end results should be.

You can calculate the dates between a start and end date, or you can calculate what the first day of the week is for a given date (and the last day of the week), or the dates of a work week.

[color:red]bbud

How about telling us what you want to be as the result of your calculations?

i.e.

Start Date, End date (range of dates between, range of workdays between)?

Monday for Start Date

Friday for End Date

HTH

Lee

Posted (edited)

thanks for replying. Sorry for not making my request clear. let me try to clear it up, given the following entries in a field:

Start date: Wed, 8/18/2010

End date: Thur, 8/19,2010

I want the following:

Week Begin Date: Given the start date, I would like this field to be calculated based on the entry in the start date field.

Week End Date: This one is actually a begin date + 4, so I have this one. However, if you know how to calc the week begin and end date given the start date entry, that would be cool to know.

Thanks,

Bud

Edited by Guest
Posted

Thank you to all the respondents. I used the calculation provided (field names modified) and made a slight modification described below.

To the previously repliers, thanks again, and what I post is probably obvious to you. I post my actions and results to help others who may be as new as me.

EventBegin - DayOfWeek ( EventBegin) + 2

The above was entered in the calculation field and a + 2 was used instead of the + 1 suggested to return my week begin date as the Monday of the week. Figured that one on my own. :)

Watch outs. I originally did not have the little drop down below the formula entry field set to date, which of course returned undesirable results.

Thanks again to everyone that replied.

Posted

Not sure if it matters to you, but it should be noted. Your calculation =

date - DayOfWeek ( date ) + 2

returns the Monday of the week, with the week beginning on Sunday - not the first day of the week that begins on Monday. The difference is that when date is Sunday, the result is the following Monday instead of the previous one.

Posted (edited)

wow, thanks for that.

99.9% of the time, it won't matter, but you know how that goes.

Sounds like I need to ask how they want to want to account the rare events that do occur on the weekend.

However, testing using the + 2 in my equation, a Saturday event registers the Begin Date as the previous Monday, and Sunday start event registers (as you stated) the following Monday. In essence, the Sunday would be the start of the week for the Monday that is being displayed, and it should not matter. While the Saturday result refers back to the previous week, which is consistent.

Thanks again for making think that one through, but as always, needed to double check how they want it recorded.

Edited by Guest

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