mariadb convert date to timestamp

Solutions on MaxInterview for mariadb convert date to timestamp by the best coders in the world

showing results for - "mariadb convert date to timestamp"
Linda
03 Jan 2019
1MariaDB [(none)]> SELECT UNIX_TIMESTAMP();
2+------------------+
3| UNIX_TIMESTAMP() |
4+------------------+
5|       1269711082 |
6+------------------+
7
8MariaDB [(none)]> SELECT UNIX_TIMESTAMP('2007-11-30 10:30:19');
9+---------------------------------------+
10| UNIX_TIMESTAMP('2007-11-30 10:30:19') |
11+---------------------------------------+
12|                            1196436619 |
13+---------------------------------------+
14
15MariaDB [(none)]> select unix_timestamp("2007-11-30 10:30:19.123456");
16+----------------------------------------------+ 
17| unix_timestamp("2007-11-30 10:30:19.123456") | 
18+----------------------------------------------+ 
19| 1196411419.123456 | 
20+----------------------------------------------+
21
22MariaDB [(none)]> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP('2007-11-30 10:30:19'));
23+------------------------------------------------------+
24| FROM_UNIXTIME(UNIX_TIMESTAMP('2007-11-30 10:30:19')) |
25+------------------------------------------------------+
26| 2007-11-30 10:30:19                                  |
27+------------------------------------------------------+
28