on 05-19-2011 1:46 PM
I have created the following arguement to pull dates from a report not including weekends.
I need to be able to do one more thing - return the answer to be in hours not days, but still exclude the Weekends - as of now if I change it to hours, the weekends are counted.
Local DateTimeVar d1 := {TTS_NAFT.Date_Opened};Local DateTimeVar d2 := {TTS_NAFT.Date_Resolved};
NumberVar DaysDiff := DateDiff("d", d1, d2) -
DateDiff ("ww", d1, d2, crSaturday) -
DateDiff ("ww", d1, d2, crSunday);
Hi
Try the following :
Local DateTimeVar d1 := {TTS_NAFT.Date_Opened};Local DateTimeVar d2 := {TTS_NAFT.Date_Resolved};
Numbervar hrs;
NumberVar DaysDiff := DateDiff("d", d1, d2) -
DateDiff ("ww", d1, d2, crSaturday) -
DateDiff ("ww", d1, d2, crSunday);
hrs:=DaysDiff*24;
Thanks,
Sastry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Response was 100% accurate and extremely fast. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.