Microsoft
Software
Hardware
Network
Question : SQL Reporting add days to date parameter
We have a report that calculates the percentage of an Engineers hours that were billable. This is calculated by taking their standard hours they are required to work divided by their billable hours.
This report can be run with date parameters for various amounts of weeks. There is a formula built in to calculate the standard hours based on how many weeks are selected, it looks like this (standard hours vary based on job title):
WHEN JOBTITLE = 'CONTEC'
THEN DATEDIFF(wk,@begindate,@en
ddate) * StdHours
My problem is the end date is taking 12:00am for that date and it's not including all the data. Is there a way that I could add on 1 day to the end date and still use the DATEDIFF formula?
Answer : SQL Reporting add days to date parameter
THEN DATEDIFF(wk,@begindate,DAT
EADD(d,1, @enddate)) * StdHours
you had an extra parenthesis
is this in the query or in the report you are trying this?
Random Solutions
How do I activate a product key for Windows 7 professional on a pushed machine
how can i translate gujarati sentence into english sentence ??
Extract date and part of the line from a log file
How do we use GPO (Group Policy) to REMOVE trusted sites from I.E. Trusted Sites Zone on workstations on a domain?
How do I convert an INT into a VARCHAR or STRING for use in CASE
WSUS Clients not reporting to the WSUS console or SBS 2008 Console
How do I delegate control to a user to ONLY remotely use Get-MessageTrackingLong cmdlet?
"Windows failed to load b/c a required file is missing or corrupted" CI.dll
Query To Detect if unicode data exists in field in SQL Server 2005
Function in excel