Thursday, May 14, 2009

DATEPART, DATEADD, DATEDIFF SQL Server Standard Datetime Function

SQL SERVER Transact-SQL provide us a set of functions to retrieve the current date and time or the parts of a DATETIME or SMALLDATETIME value. Say, you can extract the day, month or year from a datetime value, as well as the quarter, week, hour or even the millisecond. In this article, I will describe each of these functions with appropriate syntax and provide the best practical examples like (

No comments:

Post a Comment