Oracle 5.0 Reference Manual page 952

Table of Contents

Advertisement

timestamp value.
FROM_UNIXTIME()
values. Here is an example, using
TIMESTAMP
mysql>
SELECT UNIX_TIMESTAMP('2005-03-27 03:00:00');
+---------------------------------------+
| UNIX_TIMESTAMP('2005-03-27 03:00:00') |
+---------------------------------------+
|
+---------------------------------------+
mysql>
SELECT UNIX_TIMESTAMP('2005-03-27 02:00:00');
+---------------------------------------+
| UNIX_TIMESTAMP('2005-03-27 02:00:00') |
+---------------------------------------+
|
+---------------------------------------+
mysql>
SELECT FROM_UNIXTIME(1111885200);
+---------------------------+
| FROM_UNIXTIME(1111885200) |
+---------------------------+
| 2005-03-27 03:00:00
+---------------------------+
If you want to subtract
signed integers. See
[932],
UTC_DATE
UTC_DATE()
Returns the current UTC date as a value in
whether the function is used in a string or numeric context.
mysql>
SELECT UTC_DATE(), UTC_DATE() + 0;
-> '2003-08-14', 20030814
[932],
UTC_TIME
UTC_TIME()
Returns the current UTC time as a value in
whether the function is used in a string or numeric context.
mysql>
SELECT UTC_TIME(), UTC_TIME() + 0;
-> '18:07:53', 180753.000000
[932],
UTC_TIMESTAMP
Returns the current UTC date and time as a value in
YYYYMMDDHHMMSS.uuuuuu
context.
mysql>
SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0;
-> '2003-08-14 18:08:04', 20030814180804.000000
WEEK(date[,mode])
This function returns the week number for date. The two-argument form of
enables you to specify whether the week starts on Sunday or Monday and whether the return value
should be in the range from
the
default_week_format
Variables".
The following table describes how the
Mode
First day of week Range
0
Sunday
1
Monday
Date and Time Functions
[923]
1111885200 |
1111885200 |
|
UNIX_TIMESTAMP()
Section 12.10, "Cast Functions and
[932]
[932]
'HH:MM:SS'
UTC_TIMESTAMP()
format, depending on whether the function is used in a string or numeric
[932]
to
or from
0
53
[446]
system variable is used. See
mode
0-53
0-53
932
will map that value back to only one of the original
values in the
TIMESTAMP
[931]
columns, you might want to cast the result to
Operators".
or
'YYYY-MM-DD'
YYYYMMDD
or
HHMMSS.uuuuuu
[932]
'YYYY-MM-DD HH:MM:SS'
to 53. If the
argument is omitted, the value of
1
mode
Section 5.1.4, "Server System
argument works.
Week 1 is the first week ...
with a Sunday in this year
with more than 3 days this year
time zone:
CET
format, depending on
format, depending on
or
[932]
WEEK()

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents