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, 3023🔥, 0💬
Popular Posts:
Where Is the Export Dump File Located in Oracle? If you are not specifying the dump directory and fi...
How To Use "IF ... ELSE IF ..." Statement Structures in SQL Server Transact-SQL? "IF ... ELSE IF ......
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying...
How To Create a Stored Program Unit in Oracle? If you want to create a stored program unit, you can ...
How To Use GO Command in "sqlcmd" in SQL Server? "sqlcmd" is a command line client application to ru...