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:
MySQL UTC_DATE Example
The following query shows you the basic use of this MySQL UTC date function.
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;
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');