The DATEDIFF() function returns the time between two dates.DATEDIFF(datepart,startdate,enddate)
Simple example using Datediff()
SELECT DATEDIFF(day,'2008-06-05','2008-08-05') AS [Difference Date]
Calculating Intervals using Datediff() Function
USE test
CREATE TABLE [dbo].[MyTable](
[CustomerId] [int] NULL,
[DateTime] [datetime] NULL,
[interval] [int] NULL
) ON [PRIMARY]
CREATE PROC CalculateInterval
AS
DECLARE...
This blog related to all the experience that i gain and face during past career. It covers Microsoft technology like. Microsoft Dot Net, SQL Server, Scripting Language etc,.
Pages
Thursday, December 22, 2011
Using Datediff() Function in SQL SERVER
Read More »
Wednesday, December 21, 2011
Classic ASP and ASP.NET Security Image (CAPTCHA) Generator
Create and download your own CAPTCHAhttp://www.tipstricks.o...
Tuesday, December 20, 2011
Send Mail in ASP.Net 2.0
Send Email in ASP.Net 2.0 - Feed back Form
using System.Web.Mail;using System.Net.Mail;
The Send mail functionality is similar to Dotnet 1.1 except for few changes System.Net.Mail.SmtpClient is used instead of System.Web.Mail.SmtpMail (obsolete in Dotnet 2.0). System.Net.MailMessage Class is used instead of System.Web.Mail.MailMessage (obsolete in Dotnet 2.0) The System.Net.MailMessage class collects From address as MailAddress object. The System.Net.MailMessage class collects To, CC,...
Monday, December 19, 2011
Playing with String in C# Dot Net
C Sharp String - Related Contents
How to use C# string Clone
How to use C# string Compare
How to use C# string Contains
How to use C# string Copy
How to use C# string CopyTo
How to use C# string EndsWith
How to use C# string Equals
How to use C# string Format
How to use C# string IndexOf
How to use C# string Insert
How to use C# string Length
How to use C# string Split
How to use C# string Substring
How to validate a string using TryParse in C#...
Friday, December 16, 2011
SQL SERVER 2005 Ranking Functions (Transact-SQL) – ROW_NUMBER, RANK, DENSE_RANK, NTILE

SQL Server 2005 ranking functionsSQL Server 2005 has total of 4 Ranking function. Ranking functions return a ranking value for each row in a partition. All the ranking functions are non-deterministic.
ROW_NUMBER()RANK()DENSE_RANK()NTILE()
ROW_NUMBER () OVER ([] )
Returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition.It Returns...
Wednesday, December 7, 2011
Sql Server Connection Module in VB 6.0
************************************************** Global conn As New adodb.connectionGlobal con As New adodb.connectionGlobal pconn As New adodb.connectionGlobal rs As New adodb.RecordsetGlobal app_path As StringGlobal server_name As StringGlobal server_username As StringGlobal server_password As StringGlobal userName As StringPublic Sub connect() If conn.State = 1 Then conn.Close app_path = "C:\Program Files\Microsoft Visual...
Tuesday, December 6, 2011
Time & Date : Auto Expire / The JavaScript Source
Time & Date : Auto Expire / The JavaScript Sou...
Image Effects : Image Navigator / The JavaScript Source
Image Effects : Image Navigator / The JavaScript Sou...
Subscribe to:
Posts (Atom)
My Blog List
-
-
-
-
Kumaon University Nainital B.Ed entrance exam test result 2012 - कुमाऊँ विश्वविधालय, नैनीताल (उत्तराखण्ड)11 years ago