DECLARE @StartDate DATETIME
DECLARE @EndDate DATETIME
SET @StartDate = '2008/10/01'
SET @EndDate = '2008/10/31'
SELECT
(DATEDIFF(dd, @StartDate, @EndDate) + 1)
-(DATEDIFF(wk, @StartDate, @EndDate) * 2)
-(CASE WHEN DATENAME(dw, @StartDate) = 'Sunday' THEN 1 ELSE 0 END)
-(CASE WHEN DATENAME(dw, @EndDate) = 'Saturday' THEN 1 ELSE 0 END)
Here you will find about .net technology. also can get example about MVC.net and jquery.
Thursday, March 21, 2013
Count Day In Sql Server
Subscribe to:
Post Comments (Atom)
Opps Part 1 : Abstraction
Abstraction in C# is a fundamental concept of object-oriented programming (OOP) that allows developers t...
-
exec xp_cmdshell 'net use Z: \\192.01.01.10\FileStorage [Password] /user: 192.01.01.10 \Administrator'(Username) --exec xp_c...
-
MaxDepth – A positive integer that specifies the maximum nested node depth per read. The default value is 32. Maximum is 2147483647. Ma...
-
<html> <body> <table> <tr><td>Text to Save:</td></tr> <tr> <td colspan="3...
No comments:
Post a Comment