SUBDATE()
See DATE_SUB()
SYSDATE()
Returns the current date and time. See also CURTIME(), NOW(), and CURRENT_TIMESTAMP().
Example:
SELECT SYSDATE()
Result:
'2000-01-31 23:54:34'
SYSTEM_USER()
Returns the user of the current connection.
Example:
SELECT SYSTEM_USER()
Result:
'mark@localhost'
TAN(x)
Returns the tangent of x where x is in radians.
Example:
SELECT TAN(12)
Result:
- 0.635860
TIME_FORMAT(time, format_symbol)
Returns the given time in the specified format_symbol. The format_symbol can only be the time-related
symbols in the table under DATE_FORMAT(). See DATE_FORMAT().
Example:
SELECT TIME_FORMAT('2000-01-23 00:34:33', '%H %i')
Result:
00 34
TIME_TO_SEC(time)
Returns the number of seconds based on the time given in the argument.
Example:
SELECT TIME_TO_SEC("15:26:29")
Results:
55589
TO_DAYS(date)
Returns the number of days from the year 0 to the given date. See FROM_DAYS().
Example:
SELECT TO_DAYS('1902-02-12')
Result:
694733
TRIM([[BOTH or LEADING or TRAILING][x] FROM ] y])
Returns the string y with the specified string x removed from the beginning, end, or both of the string y. If no
options are used, spaces are removed from the front and back of the string. See LTRIM() and RTRIM().
Example:
SELECT TRIM(" Mark ")
Result:
"Mark"
Example:
SELECT TRIM(LEADING "M" FROM "Mark")