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

eval for the 2nd & 4th Mon of the Month

Status
Not open for further replies.

lareya

Technical User
Jan 30, 2003
49
US
Okay,
I found this in the faq. I think this is close to what I need. However, I only want to see the 2nd & 4th Monday of every month. How do I select that from this formula?

Code:
local dateTimeVar InputDate:={Post Case.ENTER_PROC_ROOM_DATE};
local numbervar A;
local numbervar B;
local datevar C;
local numbervar D;

    A := Weekday(InputDate);
    B := Year(InputDate + ((8 - A) Mod 7) - 3);
    C := cdate(B, 1, 1);
    D := (Weekday(C) + 1) Mod 7;
(InputDate - C - 3 + D) \ 7 + 1

I think this is what I need.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Crystal 8.5; ORSOS/One Call Hospital Scheduling System v9.3; SQL database; Huge Newbie to Crystal! Operating Room RN Analyst
 
Are you saying that you only want data returned to the report for the 2 & 4th Monday of each month?

Saying that you only want to see it is a bit vague.

Does SQL Database mean MS SQL Server database?

-k
 
My bad.
I was hoping that this formula would give the correct order of day in the month. Example 01/04/2004 for this date
Code:
Dr      Date          Day       Day#InMonth
Dr. X   01/04/2005    Tue        1
        01/05/2005     Wed        1
        01/11/2005     Tue        2
        01/12/2005      Wed        2

I thought this formula I found did this, but it isn't doing it. Not sure exactly what it is doing. It shows this:
Code:
Dr      Date          Day       Day#InMonth
Dr. X   02/01/2005    Tue        5  *wrong should be 1    
        02/02/2005     Wed       5  *wrong should be 1
        02/03/2005     thu       5  *wrong should be 1
        01/12/2005      Wed      2  *wrong should be 1

I am doing block times.
block times = total X worked - X worked out of block

My program cannot do block times if they are irregular, like the 2nd & 4th Monday. It can only see Mondays.
also it does check for times. some block times are 7-3 but others are for 9:30 - 12noon. I have to make crystal do the irregular block times.

I have this:
Code:
Dr.  Day     ProcID     Xin     Xout      Date

Just need to single out the irregular days.

thanks!

Lareya

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Crystal 8.5; ORSOS/One Call Hospital Scheduling System v9.3; SQL database; Huge Newbie to Crystal! Operating Room RN Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top