UTC_TIMESTAMP() function in MySQL Last Updated : 13 Oct, 2020 Comments Improve Suggest changes Like Article Like Report UTC_TIMESTAMP() function in MySQL is used to check current Coordinated Universal Time (UTC) date and time value. It returns the current UTC date and time value in YYYY-MM-DD HH:MM:SS or YYYYMMDDHHMMSS.uuu format, depending on whether the function is used in string or numeric context. Syntax : UTC_TIMESTAMP OR UTC_TIMESTAMP() Parameter : This method does not accept any parameter. Returns : It returns the current UTC date and time value. Example-1 : Getting the current UTC date and time using UTC_TIMESTAMP Function. SELECT UTC_TIMESTAMP as CurrUtcDateAndTime ; Output : CurrUtcDateAndTime 2020-10-09 18:08:13 Example-2 : Getting the current UTC date and time using UTC_TIMESTAMP Function in numeric format. SELECT UTC_TIMESTAMP + 0 as CurrUtcDateAndTime ; Output : CurrUtcDateAndTime 20201009180940 Example-3 : The UTC_TIMESTAMP function can be used to set value of columns. To demonstrate create a table named DeliveryDetails. CREATE TABLE DeliveryDetails ( DeliveryId INT AUTO_INCREMENT, ProductId INT NOT NULL, ProductName VARCHAR(20) NOT NULL, Delivered_At TIMESTAMP NOT NULL, PRIMARY KEY(DeliveryId) ); Here, we will use UTC_TIMESTAMP function when a delivery will be completed. The value in Delivered_At column will be the value given by UTC_TIMESTAMP Function. INSERT INTO DeliveryDetails(ProductId, ProductName, Delivered_At) VALUES (1010001, 'Dell Inspirion', UTC_TIMESTAMP ); Now, checking the DeliveryDetails table : SELECT * FROM DeliveryDetails; Output : DeliveryId ProductId ProductName Delivered_At 1 1010001 Dell Inspirion 2020-10-09 18:17:31 Comment More infoAdvertise with us Next Article UTC_TIMESTAMP() function in MySQL jana_sayantan Follow Improve Article Tags : SQL DBMS-SQL mysql Similar Reads UNIX_TIMESTAMP() function in MySQL UNIX_TIMESTAMP() : This function in MySQL helps to return a Unix timestamp. We can define a Unix timestamp as the number of seconds that have passed since â1970-01-01 00:00:00âUTC. Even if you pass the current date/time or another specified date/time, the function will return a Unix timestamp based 2 min read UTC_TIME() function in MySQL UTC_TIME() function in MySQL is used to check current Coordinated Universal Time (UTC) time value. It returns the UTC time value in 'HH:MM:SS' or HHMMSS format, depending on whether the function is used in string or numeric context. Syntax : UTC_TIME OR UTC_TIME() Parameter : This method does not ac 2 min read TIMESTAMPDIFF() function in MYSQL TIMESTAMPDIFF() : This function in MySQL is used to return a value after subtracting a DateTime expression from another. Syntax : TIMESTAMPDIFF(unit,expr1,expr2) Parameters : It will accept three parameters. unit â It denotes the unit for the result. It can be one of the following.MICROSECOND, SECON 2 min read TIME() Function in MySQL The TIME() function in MySQL is used to extract the time portion from a date or datetime expression, returning the time in the format 'HH:MM'. This function is particularly useful when working with time components in databases, such as scheduling or logging systems. In this article, We will learn ab 4 min read CURRENT_TIMESTAMP() function in MySQL CURRENT_TIMESTAMP() function in MySQL is used to check the current date and time value. In MySQL function, CURRENT_TIMESTAMP is needed when you need to keep a record of the exact time of delivery which is helpful in improving the services and functionalities of any organization. The format of this f 2 min read SEC_TO_TIME() Function in MySQL SEC_TO_TIME() function : This function in MySQL is used to return a time value based on the specified seconds value. Here the returned time value will be in the format of HH:MM:SS. For example, if the specified second value is 63, this function will return "00:01:03". Syntax : SEC_TO_TIME(seconds) P 1 min read SUBDATE() function in MySQL SUBDATE() function in MySQL is used to subtracts a time value (as interval) from a given date. Syntax : SUBDATE(date, INTERVAL expr unit) Parameter : This function accepts three parameters as given below : date : First specified date. expr : The value of the time/date interval to subtract. unit : Th 2 min read SYSDATE() function in MySQL SYSDATE() function in MySQL is used to return the current date and time in YYYY-MM-DD HH:MM:SS or YYYYMMDDHHMMSS.uuuuuu format depending on the context of the function. Syntax : SYSDATE() Parameter : This method does not accept any parameter. Returns : It returns the current date and time value. Exa 1 min read UTC_DATE() function in MySQL UTC_DATE() function in MySQL is used to check current Coordinated Universal Time (UTC) date. It returns the UTC date value in 'YYYY-MM-DD' or YYYYMMDD format, depending on whether the function is used in string or numeric context. Syntax : UTC_DATE OR UTC_DATE() Parameter : This method does not acce 2 min read LOCALTIMESTAMP() Function in MySQL LOCALTIMESTAMP() function : This function in MySQL is used to return the current date and time in the format of "YYYY-MM-DD HH-MM-SS" (string) or as YYYYMMDDHHMMSS.uuuuuu (numeric). Syntax : LOCALTIMESTAMP OR LOCALTIMESTAMP() Parameter : This method does not accept any parameters. Returns : It retur 1 min read Like