SQL > SQL Date Functions

In this section, we cover common date functions seen in SQL. Different database systems have different formats for date-type data, and each RDBMS may employ different date functions, and there may also be differences in the syntax for each RDBMS even when the function call is the same. All such differences are explained in each section. Please note that we do not list all possible SQL date functions in this tutorial. Rather, the most commonly used ones are covered.

List of SQL Date Functions

Function NameUsage
DATEADDAdds an interval to a date value in SQL Server
DATEDIFFCalculates the difference between two dates in MySQL and SQL Server
DATEPARTExtracts a specific part of a date/time value in SQL Server
GETDATERetrieves database time in SQL Server
SYSDATERetrieves database time in Oracle and MySQL

Copyright © 2016   1keydata.com   All Rights Reserved     Privacy Policy     About   Contact