Tutorial Gateway

  • C
  • C#
  • Python
  • SQL
  • Java
  • JS
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Go Programs
    • Python Programs
    • Java Programs
  • MySQL

MySQL UTC_DATE Function

MySQL UTC_DATE function is one of the MySQL Date Functions, which returns the current UTC date value in YYYY-MM-DD or YYYYMMDD format. The syntax of the UTC date Function in MySQL is as shown below:

UTC_DATE;

UTC_DATE();

MySQL UTC_DATE Example

The following query shows you the basic use of this MySQL UTC date function.

SELECT UTC_DATE;

SELECT UTC_DATE();
MySQL UTC_DATE Function 2

As you can see from the above screenshot, both the statements are returning the same output. I mean, both of them are showing today’s UTC date in YYYY-MM-DD format. This Date Function example shows you what happens when adding days to this UTC DATE function.

SELECT UTC_DATE(), UTC_DATE() + 5;
MySQL UTC_DATE Function 3

As you can see, it has added those 5 days to current UTC date and displaying the MySQL UTC date in YYYYMMDD string format

MySQL UTC_DATE Example 2

In this example, we are using DATEDIFF function to compare the date difference between the UTC date and a custom date

SELECT DATEDIFF(UTC_DATE(), '2019-02-10');
MySQL UTC_DATE Function 4

Filed Under: MySQL

  • How to Download MySQL
  • Install MySQL on Windows
  • MySQL Create Database
  • MySQL Delete Database
  • MySQL Create Table
  • MySQL Drop Table
  • MySQL SELECT Statement
  • MySQL ALIAS Column
  • MySQL Distinct
  • MySQL Insert Statement
  • MySQL Delete
  • MySQL Truncate Table
  • MySQL WHERE Clause
  • MySQL Order By
  • MySQL Group By
  • MySQL Having Clause
  • MySQL LIMIT
  • MySQL Arithmetic Operators
  • MySQL COALESCE Function
  • MySQL AND Operator
  • MySQL NOT Operator
  • MySQL OR Operator
  • MySQL XOR Operator
  • MySQL BETWEEN Operator
  • MySQL Not Between Operator
  • MySQL GREATEST Function
  • MYSQL LEAST Function
  • MySQL LIKE Operator
  • MySQL NOT LIKE Operator
  • MySQL IFNULL Operator
  • MySQL NULLIF Operator
  • MySQL INTERVAL Operator
  • MySQL IS Operator
  • MySQL IN Operator
  • MySQL NOT IN Operator
  • MySQL IS NOT NULL
  • MySQL IS NULL
  • MySQL Inner Join
  • MySQL Cross Join
  • MySQL Right Join
  • MySQL Left Join
  • MySQL Aggregate Functions
  • MySQL Date Functions
  • MySQL Date Function
  • MySQL String Functions
  • MySQL Numeric Functions

Copyright © 2021ยท All Rights Reserved by Suresh.
About | Contact | Privacy Policy