You are here

Date and Time Functions

Here are the most important date and time funtcions, which are supported by most of sql databases.

CURRENT Returns a DATETIME with current date and time.
DATE(Formula) Convert the string argument into date. In some RDBMS in numeric argument is alowed too.
DAY(Formula) Returns the day from a date-value.
EXTEND(Datetime, [ raram1 TO param2 ] ) Sets the precision of date and datetime values. The first argument is the date to be converted, the second argument defines the precision in form of beginning value and the end value desired.
SELECT EXTEND( datevalue, MONTH TO YEAR) as time, sum(anz) as orders 
FROM torder 
Return some order statistics.
MDY(Formula1, Formula2, Formula3) Builds a date from ist components : month, day of the month, year.
MONTH(Datum) Extracts and returns the month from a date.
TODAY Returns current date.
WEEKDAY(datevalue) Calculates and returns the weekday of a date.
YEAR(datevalue) Extracts and returns the year from a date.