In this MariaDB tutorial, we will discuss the implementation of MariaDB Date Add Days function with the help of a function and also look at several examples related to it. There are lists of the topic that comes under discussion:
- MariaDB Date Add Days
- MariaDB Date Add Days And Hours
- MariaDB Date Add Days And Minutes
- MariaDB Date Add Days Between Two Dates
- MariaDB Date Add Days Between
- MariaDB Date Add Days Count
- MariaDB Date Add Days Group By
- MariaDB Date Add Days Greater Than
- MariaDB Date Add Days Greater Than Today
- MariaDB Date Add Days Hours
- MariaDB Date Add Days In Month
- MariaDB Date Add Days Like
- MariaDB Date Add Days Not Working
- MariaDB Date Add Days Of Week
- MariaDB Date Add Days Per Day
- MariaDB Date Add Days Quarter
- MariaDB Date Add Days Regex
- MariaDB Date Add Days Seconds
- MariaDB Date Add Days Using Timestamp
- MariaDB Date Add Days Week
- MariaDB Date Add Days Year
MariaDB Date Add Days
Here we will understand and learn how to use the MariaDB DATE_ADD function to add days in date by query, which is explained with the help of an example.
The DATE_ADD method in MariaDB retrieves a date after a time/date period has been added. Let’s see the syntax of the MariaDB DATE_ADD function by the following query:
SYNTAX:
SELECT DATE_ADD( DATE, INTERVAL VALUE UNIT) FROM TABLE_NAME;
The syntax explanation:
- INTERVAL: INTERVAL is added on this date.
- VALUE: The length of the time/date interval to be added. This parameter accepts both positive and negative values.
- UNIT: The interval’s unit type, such as DAY, MONTH, MINUTE, HOUR, etc. One of the following possibilities exists:
- MICROSECOND
- SECOND_MICROSECOND
- MINUTE_MICROSECOND
- HOUR_MICROSECOND
- DAY_MICROSECOND
- SECOND
- MINUTE_SECOND
- HOUR_SECOND
- DAY_SECOND
- MINUTE
- HOUR_MINUTE
- DAY_MINUTE
- HOUR
- DAY_HOUR
- DAY
- DAY_MICROSECOND
- DAY_SECOND
- DAY_MINUTE
- DAY_HOUR
- WEEK
- MONTH
- QUARTER
- YEAR
- YEAR_MONTH
NOTE:
The DATE_ADD function will presume that the left-most component of the interval value was not submitted if we specify an intermediate value that is too brief for the unit you have specified.
Here is a sample example of the MariaDB DATE_ADD function by the following query:
EXAMPLE:
SELECT DATE_ADD(`CURRENT_DATE`,INTERVAL 25 MINUTE) FROM EMPLOYEE
LIMIT 5;
In this preceding query, the MariaDB SELECT statement has been used the DATE_ADD function on the CURRENT_DATE column of the EMPLOYEE table. The main use is to add 25 minutes to all records of the CURRENT_DATE column by using the INTERVAL keyword inside parameters.
At the end of the query, we have used the LIMIT clause as LIMIT 5 to retrieve the first 5 records of the EMPLOYEE table of USA by using the SELECT statement.

In this section, we have understood by the example how to use the MariaDB DATE_ADD function on the EMPLOYEE table in the query.
Read: MariaDB Check If Rows Exists
MariaDB Date Add Days And Hours
In this section, we will learn how to use the MariaDB DATE_FUNCTION with the DAYS_HOUR value in the parameter of the query. And it will be explained with the help of an illustrated example.
EXAMPLE:
SELECT DATE_ADD(`CURRENT_DATE`,INTERVAL 5 DAY_HOUR) AS DAYS_HOUR FROM EMPLOYEE
LIMIT 5;
As we see in the above query, we have used the DATE_ADD function on the CURRENT_DATE column from the EMPLOYEE table by using the SELECT statement. In the DATE_ADD function, we are adding 5 hours of a day to every record of the CURRENT_DATE column.
To shorter the function name, we have used the alias clause with AS keyword and given the name as DAYS_HOUR for the output column.
At the end of the query, we have used the LIMIT clause as LIMIT 5 to retrieve the first 5 records of the EMPLOYEE table by using the SELECT statement.

We have used an example for making it understandable, how to use the MariaDB DATE_ADD function with the DAY_HOUR value in the EMPLOYEE table by the query. We hope that the concept of the MariaDB DATE_ADD function might be clear with the help of an example.
Read: MariaDB Check Constraint
MariaDB Date Add Days And Minute
In this section, we will learn how to use the MariaDB DATE_FUNCTION with the DAYS_MINUTE value in the parameter of the query. And it will be explained with the help of an illustrated example.
EXAMPLE:
SELECT DATE_ADD(`CURRENT_DATE`,INTERVAL 5 DAY_MINUTE) AS DAYS_MINUTE FROM EMPLOYEE
LIMIT 5;
As we see in the above query, we have used the DATE_ADD function on the CURRENT_DATE column from the EMPLOYEE table by using the SELECT statement. In the DATE_ADD function, we are adding 5 minutes of a day to every record of the CURRENT_DATE column.
To shorter the function name, we have used the alias clause with AS keyword and given the name as DAYS_MINUTE for the output column.
At the end of the query, we have used the LIMIT clause as LIMIT 5 to retrieve the first 5 records of the EMPLOYEE table by using the SELECT statement.

In this sub-topic, we have understood how to use the MariaDB DATE_ADD function with the DAY_MINUTE value in the EMPLOYEE table. We hope that concept might be clear with the help of an example.
Read: MariaDB Greatest Function
MariaDB Date Add Days Between Two Dates
In this section, we will learn how to use the MariaDB DATE_ADD function with the DATEDIFF function in the query. We will understand it with the help of an example.
In MariaDB, the DATEDIFF function returns days based on the difference between two date values from the query. The syntax of the MariaDB DATE_ADD function with the DATEDIFF function by the following query:
SYNTAX:
SELECT DATE_ADD(DATE, INTERVAL VALUE UNIT), DATEDIFF(DATE_1,DATE_2) FROM TABLE_NAME;
The syntax explanation:
- DATE_1, DATE_2: The two dates from which the difference is calculated. The calculation is DATE_1 – DATE_2.
Here is an illustrated example of the MariaDB DATE_ADD function with the DATEDIFF function by the following query:
EXAMPLE:
SELECT DATE_ADD(JOINING_DATE, INTERVAL 5 SECOND) AS DATE_SECOND,
DATEDIFF(JOINING_DATE, EXPIRING_DATE) AS DATE_DIFFERENCE
FROM FAZZRO_COMPANY
LIMIT 4;
As we see in the above query, we have used the DATE_ADD function on the JOINING_DATE column and also used the DATEDIFF function on the JOINING_DATE and EXPIRING_DATE columns from the FAZZRO_COMPANY table by using the SELECT statement.
In the DATE_ADD function, we have added the 5 seconds in every record of the JOINING_DATE column. And in the DATEDIFF function, we have to calculate the difference days from the JOINING_DATE and EXPIRING_DATE columns.
We have also used the ALIAS clause for both the function to shorter the name and named DATE_SECOND and DATE_DIFFERENCE for the output column.
At the end of the query, we have used the LIMIT clause as LIMIT 5 to retrieve the first 4 records from the FAZZRO_COMPANY table by using the SELECT statement.

In this section, we have understood how to use the MariaDB DATE_ADD and DATEDIFF functions on the FAZZRO_COMPANY table. And we have explained with the help of a sample example.
Read: MariaDB Not Equal Operator
MariaDB Date Add Days Between
We will learn and understand how to use the MariaDB DATE_ADD function with the BETWEEN condition in the query. And it will be explained with the help of an illustrated example.
The MariaDB BETWEEN condition retrieves records based on the SELECT statement. It is also used in the UPDATE, DELETE and INSERT statements.
Let’s have a look at the MariaDB DATE_ADD function with the BETWEEN condition by the following query:
EXAMPLE:
SELECT DATE_ADD(JOINING_DATE, INTERVAL 10 DAY_HOUR) FROM FAZZRO_COMPANY
WHERE ID BETWEEN 5 AND 10;
- As we see in the above query, we have used the DATE_ADD function on the JOINING_DATE column from the FAZZO_COMPANY table by using the SELECT statement.
- In the DATE_ADD function, we have added the 10 hours of a day to all records of the JOINING_DATE column by using the INTERVAL keyword inside the parameter.
- In the WHERE condition, the ID column contains the value between 5 and 10. If the WHERE condition is TRUE, it will retrieve records from the FAZZRO_COMPANY table using the SELECT statement.

We have understood the concept of the MariaDB DATE_ADD function with the BETWEEN condition in the FAZZRO_COMPANY table. And we have explained it with the help of an example.
Read: MariaDB Drop Index + Examples
MariaDB Date Add Days Count
Here we will understand and learn how to use the MariaDB DATE_ADD function with the COUNT function in the query. And it will be explained with the help of an illustrated example.
In MariaDB, the COUNT function is used to return a total number of rows from the table in the query. Let’s see a sample example of the MariaDB DATE_ADD function with the COUNT function by the following query:
EXAMPLE:
SELECT DATE_ADD(JOINING_DATE, INTERVAL 10 DAY_HOUR) AS DATE_HOUR,
COUNT(JOINING_DATE) AS TOTAL_COUNT FROM FAZZRO_COMPANY;
- In this query, we have used the DATE_ADD function and COUNT function on the JOINING_DATE column from the FAZZRO_COMPANY table by using the SELECT statement.
- In the DATE_ADD function, we have added 10 hours of a day by using the INTERVAL keyword. And in the COUNT function, we have counted the total number of rows from the JOINING_DATE column.
- To shorter the function name, we have used the ALIAS clause with AS keyword and given the name DATE_HOUR and TOTAL_COUNT for the output column. It is done by taking from the FAZZRO_COMPANY table by using the SELECT statement.

In this section, we have used an example to understand the concept of the MariaDB DATE_ADD and COUNT functions in the FAZZRO_COMPANY table.
Read: MariaDB Reserved Words
MariaDB Date Add Days Group By
In this tutorial, we will learn and understand how to use the MariaDB DATE_ADD function with the GROUP BY clause in the query. This is explained with the help of an illustrated example.
The group by clause in MariaDB divides a result’s rows into categories. The aggregate functions count(), min(), max(), sum(), and avg() are frequently used with the group by function to obtain attributes of groups. For example, the number of elements (count), the total of values (sum), the maximum element (max), the minimum element (min), and the average of elements (avg).
Here is a sample example of the MariaDB DATE_ADD function with the GROUP BY clause in the below following query:
EXAMPLE:
SELECT DATE_ADD(JOINING_DATE, INTERVAL 10 DAY_HOUR) AS DATE_HOUR, FULL_NAME
FROM FAZZRO_COMPANY
GROUP BY FULL_NAME;
In this query, we have used the DATE_ADD function on the JOINING_DATE column from the FAZZRO_COMPANY table by using the SELECT statement. In the DATE_ADD function, we have added 10 hours of a day by using the INTERVAL keyword.
We have also selected the records of the FULL_NAME column from the FAZZRO_COMPANY table by using the SELECT statement. At the end of the query, we grouped them by the FULL_NAME column by using the GROUP BY clause from the FAZZRO_COMPANY table.

In this section, we have used the simplest form of the MariaDB DATE_ADD function with the GROUP BY clause to add a date to the query. And we have used an example to make it understandable.
Read: MariaDB Rename View
MariaDB Date Add Days Greater Than
We’ll discuss and learn how to use the MariaDB DATE_ADD function with the GREATER THAN operator in the query. And we will try to explain it with the help of an illustrated example.
In MariaDB, the GREATER THAN operator is used after the WHERE condition which will retrieve records after selecting from the SELECT statement. It is also used in the UPDATE, DELETE and INSERT statements. The main use of the GREATER THAN operator is used to find greater value from numbers in the WHERE condition.
Here is an illustrated example of the MariaDB DATE_ADD function with the GREATER THAN operator by the following query:
EXAMPLE:
SELECT DATE_ADD(JOINING_DATE, INTERVAL 10 DAY_HOUR) AS DATE_HOUR, FULL_NAME
FROM FAZZRO_COMPANY
WHERE ID >5;
As we see in the preceding query, we have used the DATE_ADD function on the JOINING_DATE column from the FAZZRO_COMPANY table. And we have also selected the records of the FULL_NAME column from the table. In the DATE_ADD function, we are adding 10 hours of a day to every record of the JOINING_DATE column.
In the WHERE condition, we are taking the record of the ID column whose value is greater than 5. If the WHERE condition gets TRUE, it will retrieve all records from the FAZZRO_COMPANY table by using the SELECT statement.

In this section, we have understood the concept of the MariaDB DATE_ADD function with the GREATER THAN operator in the FAZZRO_COMPANY table with the help of a query. To make it easier to understand, we have used a sample example properly.
Read: MariaDB Date_Format
MariaDB Date Add Days Greater Than Today
In this section, we will understand and learn how to use the MariaDB DATE_ADD function with the GREATER THAN operator in the query. And we have also used the NOW() function in the WHERE condition. It is explained with the help of an illustrated example.
In MariaDB, the CURRENT_DATE function is used to return the current date or DateTime value in the query. Let’s see an example of the MariaDB DATE_ADD function with the GREATER THAN operator by the following query:
EXAMPLE:
SELECT DATE_ADD(CUSTOMER_DATE,INTERVAL 3 MONTH ),FIRST_NAME,LAST_NAME FROM WALMART_CUSTOMER
WHERE Customer_Date > CURRENT_DATE;
- As we see in the above query, we have used the DATE_ADD function on the CUSTOMER_DATE column of the WALMART_CUSTOMER table.
- We have selected all records of the FIRST_NAME and LAST_NAME columns of the WALMART_CUSTOMER table.
- In the DATE_ADD function, we have added the 3 MONTH by using the INTERVAL keyword in the CUSTOMER_DATE column from the WALMART_CUSTOMER table.
- In the WHERE condition, we have used the GREATER THAN operator on the CUSTOMER_DATE column and found the DATE values which are greater than the CURRENT_DATE column.
- If the WHERE condition gets TRUE, it will retrieve all records from the WALMART_CUSTOMER table using the SELECT statement.

In this section, we have understood how to use the CURRENT_DATE function with the DATE_ADD function in the query. We have also used an example to explain it in detail.
Read: MariaDB Rename Table
MariaDB Date Add Days Hours
Here we will understand and learn how to use the MariaDB DATE_ADD function with the HOUR unit in the query. And we will use an example to understand the detail.
EXAMPLE:
SELECT DATE_ADD(`CURRENT_DATE`, INTERVAL 5 HOUR) AS DATE_HOUR,FIRST_NAME,LAST_NAME
FROM EMPLOYEE;
In the preceding query, we used the DATE_ADD function on the CURRENT_DATE column from the EMPLOYEE table. And we have also selected the record of the FIRST_NAME and LAST_NAME columns from the EMPLOYEE table by using the SELECT statement.
In the DATE_ADD function, we have added the 5 hours to all records of the CURRENT_DATE column. And to shorter the function_name, we have used the ALIAS clause with AS keyword and given the name DATE_HOUR for the output column in the result set.

in this sub-topic, we have understood the concept of how to use the MariaDB DATE_ADD function with the HOUR unit in a query. And it is explained with the help of an example.
Read: MariaDB ENUM
MariaDB Date Add Days In Month
We will discuss and learn how to use the MariaDB DATE_ADD function with the MONTH unit in the query. And it will be explained with the help of an illustrated example.
EXAMPLE:
SELECT DATE_ADD(`CURRENT_DATE`, INTERVAL 5 MONTH) AS DATE_MONTH,FIRST_NAME,LAST_NAME
FROM EMPLOYEE;
As we see in the above query, we have used the DATE_ADD function on the CURRENT_DATE column from the EMPLOYEE. We have also selected the records of the FIRST_NAME and LAST_NAME columns from the EMPLOYEE table by using the SELECT statement.
In the DATE_ADD function, we have added the 5 months of the unit in the records of the CURRENT_DATE column. To shorter the name of the function, we have used the ALIAS clause with AS keyword and we have given the name as DATE_MONTH for the output column in the result set.
NOTE:
In the query, we have a column_name as CURRENT_DATE which is reserved words of the MariaDB. To use column_name as RESERVED WORDS, we have use reserve back slash sign as ` `.

We have used an example to make it understandable how to use the MariaDB DATE_ADD function with the MONTH unit in the EMPLOYEE table by the query.
Read: MariaDB vs Postgres
MariaDB Date Add Days Like
We’ll learn how to use the MariaDB DATE_ADD function in conjunction with the LIKE clause in a query. We’ll give an illustrated example to help you understand.
Wildcards can be used in the WHERE clause of a SELECT, INSERT, UPDATE, or DELETE query with the MariaDB LIKE condition. This gives us the ability to match patterns. Let’s use an example of the MariaDB DATE_ADD function with the LIKE clause by the following query:
EXAMPLE:
SELECT DATE_ADD(`CURRENT_DATE`, INTERVAL 5 MICROSECOND) AS DATE_MICROSECOND,
FIRST_NAME,LAST_NAME
FROM EMPLOYEE
WHERE FIRST_NAME LIKE '%a';
- We have used the DATE_ADD function on the CURRENT_DATE column in the preceding query in the EMPLOYEE table.
- We selected records of the FIRST_NAME and LAST_NAME columns from the EMPLOYEE table by using the SELECT statement.
- In the DATE_ADD function, we have added the 5 microseconds to all records of the CURRENT_DATE column.
- In the WHERE condition, the FIRST_NAME column will retrieve all names whose end with the alphabet a which is lower_case. It is used by the LIKE clause as FIRST_NAME LIKE ‘%a’. If the WHERE condition gets TRUE, it will retrieve all records from the EMPLOYEE table using the SELECT statement.
- We have also used the ALIAS clause with AS keyword to shorter the function_name and given the name DATE_MICROSECOND for the output column in the result set.

We hope that the concept of how to use the MariaDB DATE_ADD function with the LIKE clause was explained with the help of an example.
Read: MariaDB Variables Tutorial
MariaDB Date Add Days Not Working
We will understand why the MariaDB DATE_ADD function is not working in a query. It will be easy to explain it with the help of an example.
In MariaDB documentation, query error usually arises due to syntax or logical errors. Suppose we use the reserved words in the CURRENT_DATE column of the EMPLOYEE table. First, we will change the column_name from CURRENT_DATE to DATE column of the EMPLOYEE table by using the ALTER TABLE statement:
ALTER TABLE EMPLOYEE CHANGE COLUMN `CURRENT_DATE` DATE datetime;
The MariaDB ALTER TABLE statement has been used to change the column of the CURRENT_DATE column to the DATE column with the DATETIME data type.
Here is a scenario of the MariaDB DATE_ADD function not working in a query. Let’s have a look at the error example of the MariaDB DATE_ADD function by the following query:
ERROR EXAMPLE:
UPDATE EMPLOYEE
SET DATE = DATE + 27
WHERE FIRST_NAME = 'Russ';
SELECT * FROM EMPLOYEE
WHERE FIRST_NAME = 'Russ';
In this query, we have added the value of the DATE column by 27 in the EMPLOYEE table on the name of RUSS in the FIRST_NAME column. But if we check it by using the SELECT statement on the EMPLOYEE table, the value of the date as 27 has been counted in seconds. And it has been added to the FIRST_NAME column of RUSS.

ERROR REMOVED EXAMPLE:
UPDATE EMPLOYEE
SET `DATE` = DATE_ADD(`DATE`, INTERVAL 27 DAY)
WHERE FIRST_NAME='Russ';
SELECT * FROM EMPLOYEE
WHERE FIRST_NAME ='RUSS';
In the first query, we have updated the DATE column by 27 days in the DATE_ADD function of the EMPLOYEE table which is based on the WHERE condition, In the WHERE condition, if the FIRST_NAME column is equal to RUSS then the value will be added to 27 days in the DATE column of the EMPLOYEE table.
If we want to check it then we can use the SELECT statement to retrieve all records of the EMPLOYEE table based on the WHERE condition. In the WHERE condition, if the FIRST_NAME is equal to RUSS. Then it will retrieve all records of the EMPLOYEE table by using the SELECT statement.

In this MariaDB tutorial, we hope that concept of how to use the MariaDB DATE_ADD function might be cleared with the help of an example.
Read: MariaDB If Null + Examples
MariaDB Date Add Days Of Week
We’ll learn how to use the MariaDB DATE_ADD function in conjunction with the WEEK unit in a query. We’ll give an illustrated example to help you understand.
EXAMPLE:
SELECT DATE_ADD(`CURRENT_DATE`, INTERVAL 4 WEEK) AS DATE_WEEK,FIRST_NAME,LAST_NAME
FROM EMPLOYEE;
In this query, we have used the DATE_ADD function on the CURRENT_DATE column in the EMPLOYEE table. We selected records of the FIRST_NAME and LAST_NAME columns from the EMPLOYEE table by using the SELECT statement.
In the DATE_ADD function, we have added the 4 WEEKS to all records of the CURRENT_DATE column to the EMPLOYEE table. To shorter the function_name, we have used the ALIAS clause with AS keyword and given the name as the DATE_WEEK column for output in the result set.

In this section, we have understood how to use the MariaDB DATE_ADD function with the WEEK unit. And we have explained it with the help of an example.
Read: MariaDB Logs – Helpful Guide
MariaDB Date Add Days Per Day
We’ll learn how to use the MariaDB DATE_ADD function in conjunction with the DAY unit in a query. We’ll give an illustrated example to help you understand.
EXAMPLE:
SELECT DATE_ADD(`CURRENT_DATE`, INTERVAL 40 DAY) AS DATE_DAYS,FIRST_NAME,LAST_NAME
FROM EMPLOYEE
LIMIT 10;
In this preceding query, we have used the DATE_ADD function on the CURRENT_DATE column in the EMPLOYEE table. We selected records of the FIRST_NAME and LAST_NAME columns from the EMPLOYEE table by using the SELECT statement.
In the DATE_ADD function, we have added 40 DAYS to all records of the CURRENT_DATE column to the EMPLOYEE table. To shorter the function_name, we have used the ALIAS clause with AS keyword and given the name as the DATE_DAYS column for output in the result set.
At the end of the query, we have used the LIMIT clause as LIMIT 10 to retrieve the first 10 records of the EMPLOYEE table by using the SELECT statement.

In the sub-topic, we have used and understood how to use the MariaDB DATE_ADD function with the DAY unit and explained it with the help of an illustrated example.
Read: MariaDB Foreign Key
MariaDB Date Add Days Quarter
We’ll learn how to use the MariaDB DATE_ADD function in conjunction with the QUARTER unit in a query. We’ll give an illustrated example to help you understand.
EXAMPLE:
SELECT DATE_ADD(`CURRENT_DATE`, INTERVAL 3 QUARTER) AS DATE_QUARTER,FIRST_NAME,LAST_NAME
FROM EMPLOYEE
LIMIT 10;
In this preceding query, we have used the DATE_ADD function on the CURRENT_DATE column in the EMPLOYEE table. We selected records of the FIRST_NAME and LAST_NAME columns from the EMPLOYEE table by using the SELECT statement.
In the DATE_ADD function, we have added the 3 QUARTER to all records of the CURRENT_DATE column to the EMPLOYEE table. To shorter the function_name, we have used the ALIAS clause with AS keyword and given the name as DATE_QUARTER column output in the result set.
At the end of the query, we have used the LIMIT clause as LIMIT 10 to retrieve the first 10 records of the EMPLOYEE table by using the SELECT statement.

In this section, we have understood how to use the MariaDB DATE_ADD function with the QUARTER unit in a query. And we have tried to explain it with the help of an example.
Read: MariaDB Reset Root Password
MariaDB Date Add Days Regex
We will study and comprehend how to utilize the MariaDB DATE_ADD function with the RLIKE condition in a query in this section. And with the help of an illustration, this is described.
In MariaDB, the RLIKE condition is used to perform regular expressions of matchmaking in the SELECT statement. It is also used in the DELETE, UPDATE and INSERT statements. Here is an illustrated example of the MariaDB DATE_ADD function with the RLIKE condition by the following query:
EXAMPLE:
SELECT DATE_ADD(`DATE`, INTERVAL 3 QUARTER) AS DATE_QUARTER,FIRST_NAME,LAST_NAME
FROM EMPLOYEE
WHERE FIRST_NAME RLIKE 'a$';
In this preceding query, we have used the DATE_ADD function on the DATE column. We have also selected all records of the FIRST_NAME and LAST_NAME columns of the EMPLOYEE table. In the DATE_ADD function, we have added 3 QUARTER to every record of the DATE column from the EMPLOYEE table.
In the WHERE condition, we will retrieve all records of the FIRST_NAME column whose name ends with the alphabet a. And it is done by using the RLIKE condition with the $ pattern in the query. We have also used the ALIAS clause to shorter the function_name and given the name DATE_QUARTER for the output column name in the result set.
If the WHERE condition gets TRUE, it will retrieve all records from the EMPLOYEE table using the SELECT statement.

In this section, we have understood how to use the MariaDB DATE_ADD function with the RLIKE clause in the query. And we have used an example to understand it properly.
Read: MariaDB Backup Database
MariaDB Date Add Days Seconds
We’ll study and comprehend how to utilise the MariaDB DATE_ADD function with the SECOND unit in a query in this section. With the help of an illustration, this is described.
EXAMPLE:
SELECT DATE_ADD(EXPIRING_DATE, INTERVAL 300 SECOND) AS DATE_SECONDS,FULL_NAME
FROM FAZZRO_COMPANY;
- In this query, we have used the DATE_ADD function on the EXPIRING_DATE column of the FAZZRO_COMPANY table.
- We have also selected the records of the FULL_NAME column from the FAZZRO_COMPANY table by using the SELECT statement.
- In the DATE_ADD function, we have added 300 seconds to all records of the EXPIRING_DATE column.
- And to shorter the function_name, we have used the ALIAS clause with AS keyword and given the name DATE_SECONDS for the output column in the result set.
- Suppose we know that 60 seconds is equal to 1 minute but in the query, we have used the DATE_ADD function with 300 seconds for the unit.
- This means that it will add 5 minutes to all records of the EXPIRING_DATE column of the FAZZRO_COMPANY table by using the SELECT statement.

We hope that the concept of the MariaDB DATE_ADD function with the SECOND unit is in a query. And we have used an example to understand in detail.
Read: MariaDB ISNULL + Examples
MariaDB Date Add Days Using Timestamp
This section will show us how to utilize the DATE_ADD function in MariaDB with the CURRENT_TIMESTAMP function in a query, with a concrete example.
In MariaDB, the CURRENT_TIMESTAMP function is used to return the current date and time
EXAMPLE:
SELECT DATE_ADD(CUSTOMER_DATE,INTERVAL 3 MONTH ) AS DATE_MONTH ,FIRST_NAME,LAST_NAME FROM WALMART_CUSTOMER
WHERE CUSTOMER_DATE> CURRENT_TIMESTAMP;
As we see in the above query, we have used the DATE_ADD function on the CUSTOMER_DATE column from the WALMART_CUSTOMER table. We have also selected all records of the FIRST_NAME and LAST_NAME columns from the WALMART_CUSTOMER table by using the SELECT statement.
In the DATE_ADD function, we have added 3 months to every record of the CUSTOMER_DATE column by using the INTERVAL keyword. To shorter the function_name, we have used the ALIAS clause with AS keyword to shorter the name and given the name as DATE_MONTH for the output column.
In the WHERE condition, we have used the GREATER THAN operator to find the value of the CUSTOMER_DATE column greater than the CURRENT_TIMESTAMP function. If the WHERE condition gets TRUE, it will retrieve all records from the WALMART_CUSTOMER table using the SELECT statement.

In this section, we have understood how to use the MariaDB DATE_ADD function with the CURRENT_TIMESTAMP function in the query. And it is easy to explain it with the help of a sample example.
Read: MariaDB Rename Column
MariaDB Date Add Days Week
This MariaDB section will show us how to utilize the DATE_ADD function in MariaDB with the WEEK unit in a query, with a concrete example.
EXAMPLE:
SELECT DATE_ADD(EXPIRING_DATE, INTERVAL 30 WEEK) AS DATE_WEEK ,FULL_NAME
FROM FAZZRO_COMPANY;
In this query, we have used the DATE_ADD function on the EXPIRING_DATE column of the FAZZRO_COMPANY table. We have also selected the records of the FULL_NAME column from the FAZZRO_COMPANY table by using the SELECT statement.
In the DATE_ADD function, we have added 30 WEEKS to all records of the EXPIRING_DATE column. And to shorter the function_name, we have used the ALIAS clause with AS keyword and given the name DATE_WEEK for the output column in the result set.

In this section, we have understood and learned how to use the MariaDB DATE_ADD function with the WEEK unit in the query. And we have used an example to understand in detail.
Read: MariaDB Transaction
MariaDB Date Add Days Year
This MariaDB section will show you how to utilize the DATE_ADD function in MariaDB with the YEAR unit in a query, with a concrete example.
EXAMPLE:
SELECT DATE_ADD(EXPIRING_DATE, INTERVAL 10 YEAR) AS DATE_YEAR ,FULL_NAME
FROM FAZZRO_COMPANY;
In this query, we have used the DATE_ADD function on the EXPIRING_DATE column of the FAZZRO_COMPANY table. We have also selected the records of the FULL_NAME column from the FAZZRO_COMPANY table by using the SELECT statement.
In the DATE_ADD function, we have added 10 YEARS to all records of the EXPIRING_DATE column. And to shorter the function_name, we have used the ALIAS clause with AS keyword and given the name DATE_YEAR for the output column in the result set.

In this section, we have understood how to use the MariaDB DATE_ADD function with the YEAR unit in the query. And we have used an example it understands in detail.
Also, take a look at some more MariaDB tutorials.
- MariaDB Order By Clause
- MariaDB Check Empty String
- MariaDB Union Operator
- MariaDB Select Unique
- MariaDB Select Statement
We addressed the MariaDB Date Add Days function in this MariaDB tutorial, as well as several sample instances connected to it. There are lists of the topic that comes under discussion:
- MariaDB Date Add Days
- MariaDB Date Add Days And Hours
- MariaDB Date Add Days And Minutes
- MariaDB Date Add Days Between Two Dates
- MariaDB Date Add Days Between
- MariaDB Date Add Days Count
- MariaDB Date Add Days Group By
- MariaDB Date Add Days Greater Than
- MariaDB Date Add Days Greater Than Today
- MariaDB Date Add Days Hours
- MariaDB Date Add Days In Month
- MariaDB Date Add Days Like
- MariaDB Date Add Days Not Working
- MariaDB Date Add Days Of Week
- MariaDB Date Add Days Per Day
- MariaDB Date Add Days Quarter
- MariaDB Date Add Days Regex
- MariaDB Date Add Days Seconds
- MariaDB Date Add Days Using Timestamp
- MariaDB Date Add Days Week
- MariaDB Date Add Days Year
I am Bijay having more than 15 years of experience in the Software Industry. During this time, I have worked on MariaDB and used it in a lot of projects. Most of our readers are from the United States, Canada, United Kingdom, Australia, New Zealand, etc.
Want to learn MariaDB? Check out all the articles and tutorials that I wrote on MariaDB. Also, I am a Microsoft MVP.