J
Jenn
I had some great help in adding three days to an admission date and if
this date landed on a sat/sun to report the next mon, while I guess
that it was suppose to be the closest business day so for sat it should
be the fri before and if it is sun it should be the mon. I have tried
to adjust the following code but keep getting errors. Any help would be
appreciated.
This code works for reporting the following mon:
CRISIS POT: IIf([PATIENT ADMIT DATE]<>[ODD] Or [ODD] Is
Null,(IIf(Weekday(DateAdd("d",3,[PATIENT ADMIT
DATE]),2)>=6,DateAdd("d",10,[PATIENT ADMIT
DATE])-Weekday(DateAdd("d",3,[PATIENT ADMIT
DATE]),2)+1,DateAdd("d",3,[PATIENT ADMIT DATE]))),"")
This is how I was trying to adjust it:
CRISIS POT: IIf
([PATIENT ADMIT DATE]<>[ODD] Or [ODD] Is Null, ((IIf
(Weekday(DateAdd("d",3,[PATIENT ADMIT DATE])
,2)=7, DateAdd("d",10,[PATIENT ADMIT
DATE])-Weekday(DateAdd("d",3,[PATIENT ADMIT DATE]),2)+1,
DateAdd("d",3,[PATIENT ADMIT DATE])) Or
(IIf(Weekday(DateAdd("d",3,[PATIENT ADMIT DATE]),2)=6,
DateAdd("d",10,[PATIENT ADMIT DATE])-Weekday(DateAdd("d",3,[PATIENT
ADMIT DATE]),2)-1, DateAdd("d",3,[PATIENT ADMIT DATE]))),"")
Thanks
Jenn
this date landed on a sat/sun to report the next mon, while I guess
that it was suppose to be the closest business day so for sat it should
be the fri before and if it is sun it should be the mon. I have tried
to adjust the following code but keep getting errors. Any help would be
appreciated.
This code works for reporting the following mon:
CRISIS POT: IIf([PATIENT ADMIT DATE]<>[ODD] Or [ODD] Is
Null,(IIf(Weekday(DateAdd("d",3,[PATIENT ADMIT
DATE]),2)>=6,DateAdd("d",10,[PATIENT ADMIT
DATE])-Weekday(DateAdd("d",3,[PATIENT ADMIT
DATE]),2)+1,DateAdd("d",3,[PATIENT ADMIT DATE]))),"")
This is how I was trying to adjust it:
CRISIS POT: IIf
([PATIENT ADMIT DATE]<>[ODD] Or [ODD] Is Null, ((IIf
(Weekday(DateAdd("d",3,[PATIENT ADMIT DATE])
,2)=7, DateAdd("d",10,[PATIENT ADMIT
DATE])-Weekday(DateAdd("d",3,[PATIENT ADMIT DATE]),2)+1,
DateAdd("d",3,[PATIENT ADMIT DATE])) Or
(IIf(Weekday(DateAdd("d",3,[PATIENT ADMIT DATE]),2)=6,
DateAdd("d",10,[PATIENT ADMIT DATE])-Weekday(DateAdd("d",3,[PATIENT
ADMIT DATE]),2)-1, DateAdd("d",3,[PATIENT ADMIT DATE]))),"")
Thanks
Jenn