Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, November 25, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Reporting & Notification Forums - Reporting
Forum to discuss reports for SalesLogix including Crystal, SQL Reports, etc. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Reporting | New ThreadView:  Search:  
 Author  Thread: Crystal Report and Networkdays
Kim
Posts: 11
 
Crystal Report and NetworkdaysYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Nov 06 4:39 PM
fiogf49gjkf0d
I know this works in excel but how do you do a networkdays calculation in CR 8.5.
I need to do a calculation between a start date and end date using just M-F.

Thanks for your expertise.

Kim
[Reply][Quote]
John Gundrum
Posts: 632
Top 10 forum poster: 632 posts
 
Re: Crystal Report and NetworkdaysYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Nov 06 6:23 AM
fiogf49gjkf0d
Kim,

The quick answer seems to be there is no CR 8.5 equivalent of the Excel networkdays function.

Can you clarify if you are just trying to count the number of weekdays (M-F) between two dates or are you trying to do a calculation only for weekdays between two date, for example the SUM of price.

If there is no CR 8.5 equivalent of the Excel funtion then I'd have to say you are going to have to create a formula of some sort to accomplish the same thing. There is a DayofWeek() function that tell you what day of the week a date it (Sun=1, Mon=2, etc..)

John G.
[Reply][Quote]
Nathan Agersea
Posts: 3
 
Re: Crystal Report and NetworkdaysYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Nov 06 2:51 PM
fiogf49gjkf0d
Hi Kim,

Use the Date Diff Function in crystal to get what you're after.

You can use the “ww” argument in the DateDiff function to count the number of a day occurrences. DateDiff ( “measurement”, “start date”, “end Date”, “firstDayofWeek”). The first day of week argument is only available with the “ww” argument. So DateDiff ( “ww”, #4/2/2006# , #4/9/2006#, crSunday) will count the number of Sunday’s in that date range. (keep in mind, date diff ignores the start day in the range count so that formula will return 1 and DateDiff ( “d” ,#4/2/2006#, #4/9/2006#) will return 7 instead of 8). So the end result for the formula was

Formula = DateDiff ( “d” , Start Date, End Date) - DateDiff ( “ww” , Start Date, End Date, crSaturday) - DateDiff ( “ww” , Start Date, End Date, crSunday)


I hope that helps!
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/25/2024 7:20:07 AM