Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Calculating Business Days Post Reply Post New Topic
Author Message
fusion
Groupie
Groupie


Joined: 12 Nov 2007
Location: United States
Online Status: Offline
Posts: 93
Quote fusion Replybullet Topic: Calculating Business Days
    Posted: 23 Apr 2008 at 7:15pm
You can calculate number of weekdays in crystal reports.
In report create a formula and enter the following code.
 
// This formula does not account for holidays
// I am using Shared variable so that I can use in my subreports
 
Shared DateTimeVar d1 := {Orders.Order Date};
Shared DateTimeVar d2 := {Orders.Ship Date};
DateDiff ("d", d1, d2) - 
     DateDiff ("ww", d1, d2, crSaturday) -
     DateDiff ("ww", d1, d2, crSunday)
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.