> SQL Server can handle that...
>
> DATEPART(datepart, date)
> The weekday (dw) datepart returns a number that corresponds to the day of
> the week, for example: Sunday = 1, Saturday = 7. The number
> produced by the
> weekday datepart depends on the value set by SET DATEFIRST, which sets the
> fi
h 27, 2001 3:15 PM
To: CF-Talk
Subject: Re: [RE: SQL Business Dates]
thanks but dateasgn and datecomp will always be a business date. the
difference between them is the problem nights and weekends get included.
Question: Can I write a function in SQLServer like in PLSQL and call that
function fro
thanks but dateasgn and datecomp will always be a business date. the
difference between them is the problem nights and weekends get included.
Question: Can I write a function in SQLServer like in PLSQL and call that
function from within an SQL query?
"Hayes, David" <[EMAIL PROTECTED]> wrote:
Loo
SQL Server can handle that...
DATEPART(datepart, date)
The weekday (dw) datepart returns a number that corresponds to the day of
the week, for example: Sunday = 1, Saturday = 7. The number produced by the
weekday datepart depends on the value set by SET DATEFIRST, which sets the
first day of the
Can you slip in
Your code here ...
Your alternative code here ...
just a thought ...
Derek
IT Star
Web Design, Hosting, Database Integration and Internet Marketing
http://www.itstar.co.uk/
[EMAIL PROTECTED]
-Original Message-
From: Alex [mailto:[EMAIL PROTECTED]]
Sent: 27 March 200
Every time I've seen this come up, the solution is a combination of finesse
and outright hacking.
Basic solution -
Count the number of days between the two dates. If the startdate and
enddate are in M-F, that count DIV 7 will tell you how many weeks there
were, so subtract the number of weeks
Look at the DATEPART function.
-Original Message-
From: Alex [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 1:31 PM
To: CF-Talk
Subject: SQL Business Dates
I have a query ...
SELECT AVG(DATEDIFF(minute, dateasgn, datecomp)) AS diff
FROM tblprob
WHERE pr
7 matches
Mail list logo