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

Setting Specified Date in Crystal 1

Status
Not open for further replies.

Tubby6

Technical User
Jun 4, 2007
26
CH
I am using crystal v10. and i want to make my report run from every wednesday to wednesday.
it consists of this

{HPD_HelpDesk.Create Time} >= CurrentDate-7

and

time({HPD_HelpDesk.Create Time}) in time(16,0,0) to time(23,59,59)

But I want to set up such that it runs every wednesday to wednesday..


I KNOW i have to use Datepart
so i havet his
Datepart {"w", (HPD_HelpDesk.Create Time})


but i need to specify wednesday and the above is not working

your help is much appreciated
-tubby
 
Do you mean from Wednesday through Tuesday? It also depends upon when you plan to run the report. The following formula would work for the Wednesday from the previous week to the Tuesday of the current week:

{HPD_HelpDesk.Create Time} in CurrentDate-dayofweek(currentdate)-3 to CurrentDate-dayofweek(currentdate)+ 3 and
time({HPD_HelpDesk.Create Time}) in time(16,0,0) to time(23,59,59)

-LB
 
yup that's right it worked. thanks a bunch.
-tubby
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top