If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Crystal Reports > days in week

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-07-10, 04:17
Frederickg Frederickg is offline
Registered User
 
Join Date: Oct 2010
Posts: 2
Question days in week

Hi all ! my db is sql and use crystal 2008
creating a report for time and attendance :weekly.monthly
whant to know how do i display the dates for each day for each week and add each day's total in a field called "hours worked" (in week)
db fields:access date, access time , identikits
Reply With Quote
  #2 (permalink)  
Old 10-08-10, 14:45
mission mission is offline
Registered User
 
Join Date: Oct 2010
Posts: 44
Quote:
whant to know how do i display the dates for each day for each week and add each day's total in a field called "hours worked" (in week)
Not sure of what you want in the above but if you want to find out if the date is a week day, you can use the DayOfWeek function.

DayOfWeek (date)

DayOfWeek determines the day of the week the given date falls on, and converts the day of the week to a Number (1 to 7).

1=Sunday, 2=Monday, 3=Tuesday

// Order placed on Monday
If DayOfWeek({orders.ORDER DATE}) = 2 Then
HoursWorked = HoursWorked + Total

You need to change the IF condition to your requirements.
Reply With Quote
  #3 (permalink)  
Old 10-12-10, 02:39
Frederickg Frederickg is offline
Registered User
 
Join Date: Oct 2010
Posts: 2
Thanks mission it worked , you safed my bacon today !
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On