ADDYEARS(datetime, number)
ADDQUARTERS(datetime, number)
ADDMONTHS(datetime, number)
ADDDAYS(datetime, number)
ADDHOURS(datetime, number)
ADDMINUTES(datetime, number)
ADDSECONDS(datetime, number)
Adds a given number of years|quarters|months|days|hours|minutes|seconds to a specified date/time.
CREATEDATE(year,month,day)
Creates a timestamp from a given year, month and day. Time is set to midnight.
CURRENTDATE()
Returns the current date.
CURRENTTIME()
Returns the current time.
CURRENTTIMESTAMP()
Returns the current timestamp.
GETYEAR(datetime)
GETQUARTER(datetime)
GETMONTH(datetime)
GETDAY(datetime)
GETHOUR(datetime)
GETMINUTE(datetime)
GETSECOND(datetime)
Returns a number that represents the year|quarter|month|day|hour|minute|second in a given date/time.
DAYOFWEEK(datetime)
Returns the day, out of seven days in a week, represented by a given date/time.
DAYOFYEAR(datetime)
Returns the day, out of 365 days in a year, represented by a given date/time.
WEEKOFYEAR(datetime)
Returns the week, out of 52 weeks in a year, represented by a given date/time.
DAYNAME(number)
Returns the name of the day represented by the given number.
YEARDIFF(start,end)
QUARTERDIFF(start,end)
MONTHDIFF(start,end)
DAYDIFF(start,end)
HOURDIFF(start,end)
MINUTEDIFF(start,end)
SECONDDIFF(start,end)
Returns the difference in years|quarters|months|days|hours|minutes|seconds