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 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 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');