1mysql> SELECT EXTRACT(YEAR FROM '2019-07-02');
2 -> 2019
3mysql> SELECT EXTRACT(YEAR_MONTH FROM '2019-07-02 01:02:03');
4 -> 201907
5mysql> SELECT EXTRACT(DAY_MINUTE FROM '2019-07-02 01:02:03');
6 -> 20102
7mysql> SELECT EXTRACT(MICROSECOND
8 -> FROM '2003-01-02 10:30:00.000123');
9 -> 123