Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: getting hours worked on weekends and holidays Post Reply Post New Topic
Author Message
noms
Newbie
Newbie
Avatar

Joined: 23 Feb 2009
Location: South Africa
Online Status: Offline
Posts: 6
Quote noms Replybullet Topic: getting hours worked on weekends and holidays
    Posted: 23 Feb 2009 at 1:28am
hi experts
i need to create a formula to calculate how many hours did the contractor worked on the task, my data look like this:
          
Code           Contractor                            Date                             N/T    O/T
S49660 SECRETE STEPSSECRETE STEPS 2008-09-01 00:00:00.000 570 15
R04187 T.VTsuping 2008-12-01 00:00:00.000 90 210
R04185 T.VTsuping 2008-12-01 00:00:00.000 480 270
R04184 T.VTsuping 2008-12-02 00:00:00.000 480 180
and out of this date i need to work out the time that was worked on the weekend and holiday.
that means on the Normal Time field i have to create a function to calculate hours worked from Mon-Friday, Overt Time will be hours worked after 5pm then add another two fields for weekends and holidays
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 23 Feb 2009 at 6:27am
I would look into using the DayOfWeek function as this can tell which dates are weekends.  Holidays, could/will change from year to year and would need coded separately (unless it is something like Christmas or New Years which can be date driven).
 
 
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.031 seconds.