Check out example codes for "mariadb convert date to timestamp". It will help you in understanding the concepts better.

Code Example 1

MariaDB [(none)]> SELECT UNIX_TIMESTAMP();
+------------------+
| UNIX_TIMESTAMP() |
+------------------+
|       1269711082 |
+------------------+

MariaDB [(none)]> SELECT UNIX_TIMESTAMP('2007-11-30 10:30:19');
+---------------------------------------+
| UNIX_TIMESTAMP('2007-11-30 10:30:19') |
+---------------------------------------+
|                            1196436619 |
+---------------------------------------+

MariaDB [(none)]> select unix_timestamp("2007-11-30 10:30:19.123456");
+----------------------------------------------+ 
| unix_timestamp("2007-11-30 10:30:19.123456") | 
+----------------------------------------------+ 
| 1196411419.123456 | 
+----------------------------------------------+

MariaDB [(none)]> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP('2007-11-30 10:30:19'));
+------------------------------------------------------+
| FROM_UNIXTIME(UNIX_TIMESTAMP('2007-11-30 10:30:19')) |
+------------------------------------------------------+
| 2007-11-30 10:30:19                                  |
+------------------------------------------------------+

Learn ReactJs, React Native from akashmittal.com