1
drop table if exists t1;
2
create table t1 (i int, c varchar(20));
4
(unix_timestamp("2004-01-01 00:00:00"), "2004-01-01 00:00:00");
6
(unix_timestamp("2004-03-28 01:59:59"), "2004-03-28 01:59:59"),
7
(unix_timestamp("2004-03-28 02:30:00"), "2004-03-28 02:30:00"),
8
(unix_timestamp("2004-03-28 03:00:00"), "2004-03-28 03:00:00");
10
(unix_timestamp('2004-05-01 00:00:00'),'2004-05-01 00:00:00');
12
(unix_timestamp('2004-10-31 01:00:00'),'2004-10-31 01:00:00'),
13
(unix_timestamp('2004-10-31 02:00:00'),'2004-10-31 02:00:00'),
14
(unix_timestamp('2004-10-31 02:59:59'),'2004-10-31 02:59:59'),
15
(unix_timestamp('2004-10-31 04:00:00'),'2004-10-31 04:00:00'),
16
(unix_timestamp('2004-10-31 02:59:59'),'2004-10-31 02:59:59');
18
(unix_timestamp('1981-07-01 03:59:59'),'1981-07-01 03:59:59'),
19
(unix_timestamp('1981-07-01 04:00:00'),'1981-07-01 04:00:00');
20
select i, from_unixtime(i), c from t1;
22
1072904422 2004-01-01 00:00:00 2004-01-01 00:00:00
23
1080428421 2004-03-28 01:59:59 2004-03-28 01:59:59
24
1080428422 2004-03-28 03:00:00 2004-03-28 02:30:00
25
1080428422 2004-03-28 03:00:00 2004-03-28 03:00:00
26
1083355222 2004-05-01 00:00:00 2004-05-01 00:00:00
27
1099170022 2004-10-31 01:00:00 2004-10-31 01:00:00
28
1099177222 2004-10-31 02:00:00 2004-10-31 02:00:00
29
1099180821 2004-10-31 02:59:59 2004-10-31 02:59:59
30
1099184422 2004-10-31 04:00:00 2004-10-31 04:00:00
31
1099180821 2004-10-31 02:59:59 2004-10-31 02:59:59
32
362793608 1981-07-01 03:59:59 1981-07-01 03:59:59
33
362793610 1981-07-01 04:00:00 1981-07-01 04:00:00
35
create table t1 (ts timestamp);
36
insert into t1 values (19730101235900), (20040101235900);