Collections:
CURTIME() - Current Time
How to obtain the current time using the CURTIME() function?
✍: FYIcenter.com
CURTIME(prec) is a MySQL built-in function that
returns the current time with a given precision of fractional seconds.
For example:
SELECT CURTIME(), CURTIME()+1; -- +-----------+-------------+ -- | CURTIME() | CURTIME()+1 | -- +-----------+-------------+ -- | 11:49:40 | 114941 | -- +-----------+-------------+ SELECT CURTIME(6), CURTIME(6)+1; -- +-----------------+---------------+ -- | CURTIME(6) | CURTIME(6)+1 | -- +-----------------+---------------+ -- | 11:51:06.460932 | 115107.460932 | -- +-----------------+---------------+
Reference information of the CURTIME() function:
CURTIME(prec): tm Returns the current time as a value in 'hh:mm:ss.SSSSSS' or hhmmss.SSSSSS format, depending on whether the function is used in string or numeric context. Arguments, return value and availability: prec: Optional. Default is 0. The precision of fractional seconds. tm: Return value. The current time as a string or number. Available since MySQL 4.
Related MySQL functions:
⇐ CURRENT_TIMESTAMP() - Synonym for NOW()
2023-11-17, 979🔥, 0💬
Popular Posts:
How To Connect to a MySQL Server with a Port Number in MySQL? If you want to connect a MySQL server ...
How To Select All Columns of All Rows from a Table with a SELECT statement in SQL Server? The simple...
Why I Can Not Enter 0.001 Second in DATETIME values in SQL Server Transact-SQL? If you enter millise...
How to download and install Microsoft .NET Framework Version 2.0 in SQL Server? .NET Framework Versi...
How To View Data Files in the Current Database in Oracle? If you want to get a list of all tablespac...