Collections:
Extract Unit Values from a Date and Time in MySQL
How To Extract a Unit Value from a Date and Time in MySQL?
✍: FYIcenter.com
If you want to extract a specific date or time unit value out of a date or a time, you can use the EXTRACT(unit FROM expression) function. The tutorial exercise below gives you some good examples:
ELECT EXTRACT(DAY FROM NOW()) FROM DUAL; 28 ELECT EXTRACT(HOUR FROM NOW()) FROM DUAL; 23 ELECT EXTRACT(SECOND FROM NOW()) FROM DUAL; 36
⇒ Date and Time Functions in MySQL
⇐ Presenting a Past Time in Hours, Minutes and Seconds in MySQL
2018-03-13, 3063🔥, 0💬
Popular Posts:
How To Drop an Index in Oracle? If you don't need an existing index any more, you should delete it w...
How To Start the Command-Line SQL*Plus in Oracle? If you Oracle server or client installed on your w...
How to set database to be READ_ONLY in SQL Server? Databases in SQL Server have two update options: ...
How To View Data Files in the Current Database in Oracle? If you want to get a list of all tablespac...
Can You Drop an Index Associated with a Unique or Primary Key Constraint in Oracle? You can not dele...