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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LastFullWeek 1

Status
Not open for further replies.

mtownbound

Technical User
Jan 28, 2002
293
US
How can I shift the lastfullweek from Sunday-Saturday to Wednesday-Tuesday?
 

Use a formula instead, like this:

{table.date} in currentdate-dayofweek(currentdate,crWednesday)-6 to
currentdate-dayofweek(currentdate,crWednesday)

-LB
 
YOu can use the min and max of LastFullWeek to move dates

Instead of using

datefield = lastfullweek

try

datefield >= min(lastfullweek) + 3 and
datefield <= max(lastfullweek) + 3

Ian
 
Ian,

Except that doesn't take into account that lastfullweek (based on Sunday) would end two days ago (October 6) so maximum lastfullweek +3 would be tomorrow (October 9) not the last full week based on a Weds-Tues approach, which should be October 2 (as of today, October 8).

-LB
 
LB

Posts crossed over as I am a slow typist ;-)

Good point, only thought about post wednesday and forgot about trying to run on a Mon or Tuesday Doh!

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top