Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calulate the next Saturday 1

Status
Not open for further replies.

rewob65

Technical User
Nov 13, 2004
110
GB
I am trying to create a parameter, that will allow a schedule report of work done in a set week.

On Monday, I want to know the work done from Last Sunday to next Saturday.

On Tuesday. I want to know the work done from last Sunday to next Saturday. and so forth for the rest of the week.


Thanks
 
If you mean you always want the last full week, then use a record selection formula of:

{table.date} in lastfullweek

This will run from Sunday to Saturday of the previous week.

-LB
 
Thanks for that it was however really in the current week,

from last Sunday to next Saturday, it shows how close to targets we are.

Also as another thought what if the day was say Monday to Sunday, is there an easy formula. I was trying with working the current date and adding or subtracting based on its relative day.
 
If you want this for the current week, then use a formula like:

{table.date} in currentdate-dayofweek(currentdate)+1 to
currentdate-dayofweek(currentdate)+7

If you wanted to do it from Monday to Saturday, add the weekstarting condition to the dayofweek function, as in:

{table.date} in currentdate-dayofweek(currentdate,crMonday)+1 to
currentdate-dayofweek(currentdate,crMonday)+7

The default is Sunday, so was not specified in the first formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top