Unit 5 Flashcards
function produces a date by adding a specified number to a specified part of a date.
DATEADD
function returns the difference between two parts of a date.
DATEDIFF
function subtracts a specified time interval from a date.
DATE_SUB()
function returns the specified part of the date requested.
DATEPART
function is used to return a single part of a date/time, such as year, month, day, hour, minute, etc.
EXTRACT()
function will extract the year from a value stored as a SMALLDATETIME data type.
YEAR
function will extract the month from a date.
MONTH
function extracts the day of the month from a date
DAY
function returns the current system date and time
GETDATE
function returns the current system date and time in Universal Time Coordinate Format, useful for getting date and time of other location.
GETUTCDATE
Returns the current date and time
NOW()
Returns the current date
CURDATE()
Returns the current time
CURTIME()
Returns the current utc date
UTC_DATE()
Returns the current utc time
UTC_TIME()