I need to get the total hours for each day so the user knows where they are at when keying in time. I stored the date such as Month = 7 day = 27 year = 2012. I also have the Weekend date with each record. which is the main criteria.
I want to return a SQL result that has something like
Sun Mon Tues Wed Thurs Fri Sat Total
3.5 12 11 26.5
Is there a way to get the Day name such as Monday or "Mon" from passing 7/23/12
The above code returns this:
Day Month Year WeekEndDate
23 7 2012 2012-07-28 00:00:00.000 3.5
26 7 2012 2012-07-28 00:00:00.000 12
27 7 2012 2012-07-28 00:00:00.000 11
DougP
I want to return a SQL result that has something like
Sun Mon Tues Wed Thurs Fri Sat Total
3.5 12 11 26.5
Is there a way to get the Day name such as Monday or "Mon" from passing 7/23/12
Code:
Select [DAY], [MONTH],[YEAR], WeekEndDate, sum(HoursWorked) from SOWTimeReporting
Where WeekEndDate = '07/28/2012'
and ResourceLastName = 'flintstone' and
ResourceFirstName = 'fred'
Group by [DAY], [MONTH],[YEAR], WeekEndDate
The above code returns this:
Day Month Year WeekEndDate
23 7 2012 2012-07-28 00:00:00.000 3.5
26 7 2012 2012-07-28 00:00:00.000 12
27 7 2012 2012-07-28 00:00:00.000 11
DougP