Jump to content

Date Range Relationship


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

Recommended Posts

I need to relate a group records to a portal by a date range of any record for 'this week' (monday-friday). Each record will have a date field, but I was looking for a slick way to create the key on the other side of the relationship.

If Wed...date-1, date-2, date, date+1, date+2.

Don't mind writing the calc, just don't want it to be a slow field to calculate.

Thanks in advance

David

Link to comment
Share on other sites

Create a calc as such.

Let ( d = Get ( CurrentDate );

         d - DayOfWeek ( d ) + 2 & ¶  &  d - DayOfWeek ( d ) + 6 

      )

Then your keys for your relationship of the portal will be something like this.

cDateRangeCalc ≤ RecordDate

cDateRangeCalc ≥ RecordDate

Link to comment
Share on other sites

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