Check out example codes for "mysql set variable to today's date". It will help you in understanding the concepts better.

Code Example 1

SELECT CAST(CURRENT_DATE() AS CHAR(50)) INTO @today;
SELECT CAST(DATE_ADD(CURRENT_DATE, INTERVAL -1 DAY) AS DATE) INTO @yesterday;

SELECT @today, @yesterday

Learn ReactJs, React Native from akashmittal.com