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.
sql tutorial , pl sql tutorial , mysql tutorial , oracle tutorial , learn sql , sql server tutorial
CURRENT_DATE ( )
Returns the current date.
CURRENT_TIME ()
Returns the current local time.
CURRENT_TIMESTAMP ()
Returns the current local date and local time as a timestamp value.
Returns the minute based on the minute field in time_exp as an integer value in the range of 0-59.
sql tutorial , pl sql tutorial , mysql tutorial , oracle tutorial , learn sql , sql server tutorial
MONTH (date_exp)
Returns the month based on the month field in date_exp as an integer value in the range of 1-12.
MONTHNAME(date_exp)
Returns a character string containing the data source/specific name of the month (for example, January through December). Currently only supports English locale.
NOW ( )
Returns current date and time as a timestamp value.
Returns a timestamp offset by the specified interval.
Interval can be one of the following values
SQL_TSI_FRAC_SECOND (in billionths of a second)
SQL_TSI_SECOND
SQL_TSI_MINUTE
SQL_TSI_HOUR
SQL_TSI_DAY
SQL_TSI_WEEK
SQL_TSI_MONTH
SQL_TSI_QUARTER
SQL_TSI_YEAR
sql tutorial , pl sql tutorial , mysql tutorial , oracle tutorial , learn sql , sql server tutorial
Returns the integer number of intervals of type interval by which timestamp_exp2 is greater than timestamp_exp1. Valid Intervals are described in the TIMESTAMPADD function.
sql tutorial , pl sql tutorial , mysql tutorial , oracle tutorial , learn sql , sql server tutorial
This tutorial provides more the basic needs and informations on sql tutorial , pl sql tutorial , mysql tutorial , sql server , sqlcode , sql queries , sql , sql formatter , sql join , w3schools sql , oracle tutorial , mysql , pl sql , learn sql , sql tutorial for beginners , sql server tutorial , sql query tutorial , oracle sql tutorial , t sql tutorial , ms sql tutorial , database tutorial , sql tutorial point , oracle pl sql tutorial , oracle database tutorial , oracle tutorial for beginners , ms sql server tutorial , sql tutorial pdf
Related Searches to Date Functions in SQL
sql date convertsql date typedate functions in oracleinsert date in sqlsql convert dateformat date sql serversql server getdatesql server datetime formatsql server date formatdatetime sqlsql format datesql server datecurrent date sqldate format in sql serverformat date sqlsql server format dateto_date sqldate format in sqlsql datetime nowsql server date functionsdatetime sql serverconvert string to date sqldate format sql serverdate to timestampcompare date in sqldate sql serverdateadd in sqlconvert date to string sqlsql date convertt sql date formatsql convert datetimeconvert date sqldatetime format sqlconvert datetime sqlcurrent date in sqloracle sql date formatsql date functionsdate sqlsql date comparisonsql date betweensql query date greater thansql time
Adblocker detected! Please consider reading this notice.
We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.
We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!
We need money to operate the site, and almost all of it comes from our online advertising.
Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.