Logo 
Search:

SQL Server Articles

Submit Article
Home » Articles » SQL Server » Date Time FunctionsRSS Feeds

Date Time Functions

Posted By: Sarita Patel     Category: SQL Server     Views: 2975

This article explains date time functions available in sql server with different examples.

Date time functions performs an operation on a date and time input values. It returns a string, numeric or date time value.
 
Below are the available date time functions available in sql server with its determinism. It can be either deterministic means always return the same result any time they are called with a specific set of input values or nondeterministic means return different results each time they are called with a specific set of input values.
 

Function

Determinism

DATEADD

Deterministic

DATEDIFF

Deterministic

DATENAME

Nondeterministic

DATEPART

Deterministic except when used as DATEPART (dw, date). dw, the weekday datepart, depends on the value set by SET DATEFIRST, which sets the first day of the week.

DAY

Deterministic

GETDATE

Nondeterministic

GETUTCDATE

Nondeterministic

MONTH

Deterministic

YEAR

Deterministic

  
Share: 

 
 
 

Didn't find what you were looking for? Find more on Date Time Functions Or get search suggestion and latest updates.

Sarita Patel
Sarita Patel author of Date Time Functions is from United States.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!