Answers for "mysql date part"

SQL
4

mysql current date

SELECT NOW();
It returns current date and time.
Posted by: Guest on April-14-2020
1

date_part mysql

mysql> SELECT EXTRACT(YEAR FROM '2019-07-02');
        -> 2019
mysql> SELECT EXTRACT(YEAR_MONTH FROM '2019-07-02 01:02:03');
        -> 201907
mysql> SELECT EXTRACT(DAY_MINUTE FROM '2019-07-02 01:02:03');
        -> 20102
mysql> SELECT EXTRACT(MICROSECOND
    ->                FROM '2003-01-02 10:30:00.000123');
        -> 123
Posted by: Guest on July-03-2020
0

mysql current time

CURRENT_TIME return HH:ii:ss format time in mysql
Posted by: Guest on May-29-2020
0

mysql get date from datetime

WHERE DATE(datetime) = '2009-10-20'
Posted by: Guest on April-29-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language