Results 1 to 3 of 3

Thread: days in week

  1. #1
    Join Date
    Oct 2010
    Posts
    2

    Question Unanswered: 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

  2. #2
    Join Date
    Oct 2010
    Posts
    46
    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.

  3. #3
    Join Date
    Oct 2010
    Posts
    2
    Thanks mission it worked , you safed my bacon today !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •