Date And Time Functions - Oracle 5.0 Reference Manual

Table of Contents

Advertisement

Returns the number X, truncated to
fractional part.
zero.
mysql>
SELECT TRUNCATE(1.223,1);
-> 1.2
mysql>
SELECT TRUNCATE(1.999,1);
-> 1.9
mysql>
SELECT TRUNCATE(1.999,0);
-> 1
mysql>
SELECT TRUNCATE(-1.999,1);
-> -1.9
mysql>
SELECT TRUNCATE(122,-2);
-> 100
mysql>
SELECT TRUNCATE(10.28*100,0);
-> 1028
All numbers are rounded toward zero.

12.7. Date and Time Functions

This section describes the functions that can be used to manipulate temporal values. See
Section 11.1.5, "Date and Time
has and the valid formats in which values may be specified.
Table 12.13. Date/Time Functions
Name
ADDDATE()
ADDTIME()
CONVERT_TZ()
CURDATE()
CURRENT_DATE(),
CURRENT_DATE
CURRENT_TIME(),
CURRENT_TIME
CURRENT_TIMESTAMP(),
CURRENT_TIMESTAMP
CURTIME()
DATE_ADD()
DATE_FORMAT()
DATE_SUB()
[918]
DATE()
DATEDIFF()
[922]
DAY()
DAYNAME()
DAYOFMONTH()
DAYOFWEEK()
DAYOFYEAR()
EXTRACT()
FROM_DAYS()
FROM_UNIXTIME()
Date and Time Functions
can be negative to cause
D
Types", for a description of the range of values each date and time type
[917]
[917]
[918]
[918]
[918]
[918]
[918]
[918]
[919]
[921]
[922]
[919]
[923]
[923]
[923]
[923]
[923]
[923]
[923]
decimal places. If
is 0, the result has no decimal point or
D
D
digits left of the decimal point of the value
D
Description
Add time values (intervals) to a date value
Add time
Convert from one timezone to another
Return the current date
Synonyms for CURDATE()
Synonyms for CURTIME()
Synonyms for NOW()
Return the current time
Add time values (intervals) to a date value
Format date as specified
Subtract a time value (interval) from a date
Extract the date part of a date or datetime expression
Subtract two dates
Synonym for DAYOFMONTH()
Return the name of the weekday
Return the day of the month (0-31)
Return the weekday index of the argument
Return the day of the year (1-366)
Extract part of a date
Convert a day number to a date
Format UNIX timestamp as a date
915
to become
X

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Mysql 5.0

Table of Contents