Most of the time, I was required to add the time to the date, being a senior SQL Server resource. In this comprehensive article, I’ll walk you through multiple approaches on how to add time to a date in SQL Server.
SQL Server Add Time To Date
Before diving into specific approaches, it’s important to understand how SQL Server handles date and time data. SQL Server offers several date and time data types and functions that enable precise temporal calculations.
The most commonly used date/time data types include:
- DATE: Stores date only (no time component)
- TIME: Stores time only (no date component)
- DATETIME: Stores both date and time (accuracy to 3.33 milliseconds)
- DATETIME2: Improved version of DATETIME (higher precision and larger date range)
- DATETIMEOFFSET: Includes time zone
Let’s discuss each approach individually to add time to a date in SQL Server.
Approach 1: Using the DATEADD Function
The DATEADD function is the most versatile and widely used method for adding time to a date in SQL Server. It allows you to add a specified time interval to a date value.
Syntax:
DATEADD(datepart, number, date)Where:
- datepart: The part of the date to which you want to add (year, quarter, month, day, hour, minute, second, etc.)
- number: The amount to add (can be positive or negative)
- date: The date value to modify
Example-1
We can execute the following query to add 3 hours to the current date and time.
SELECT DATEADD(HOUR, 3, GETDATE()) AS 'Current Time Plus 3 Hours';After executing the above query, I got the expected output as shown in the screenshot below.

Example-2
We can execute the following query to add 30 minutes to a specific datetime.
SELECT DATEADD(MINUTE, 30, '2025-05-28 14:00:00') AS 'Call End Time';After executing the above query, I obtained the expected output, as shown in the screenshot below.

Example-3
We can execute the following query to add 2 days to the current date.
SELECT DATEADD(DAY, 3, GETDATE()) AS 'Three Days From Now';After executing the above query, I got the expected output as shown in the screenshot below.

Example 4
One of the most common scenarios I encounter is needing to add multiple time units simultaneously, for example, adding 2 hours and 40 minutes to a meeting start time.
We can execute the following query for that purpose.
DECLARE @MeetingStart DATETIME = '2025-05-28 09:00:00';
-- Add 2 hours and 40 minutes to meeting start
SELECT DATEADD(MINUTE, 40, DATEADD(HOUR, 2, @MeetingStart)) AS 'Meeting End';After executing the above query, I got the expected output as shown in the screenshot below.

Approach 2: Using Arithmetic Operators
SQL Server also allows for simple arithmetic with DATETIME values.
Example 1
We can execute the following query to add 5 days to the current date.
SELECT GETDATE() + 5 AS 'Five Days From Now';After executing the above query, I got the expected output as shown in the screenshot below.

Example 2
After executing the below query to add 5 days to the current date.
-- Add 5 days to current date
SELECT GETDATE() + 5 AS 'Five Days From Now';See the expected output below after executing the above query.

Example 3
We can execute the following query to add 12 hours to the current date.
SELECT GETDATE() + (12.0 / 24) AS 'Twelve Hours From Now';After executing the above query, I got the expected output as shown in the screenshot below.

Example 4
We can use the following query to add 45 minutes to the current date.
SELECT GETDATE() + (45.0 / (24 * 60)) AS '45 Minutes From Now';After executing the above query, I got the expected output as shown in the screenshot below.

Example 5
We can execute the following query to add 30 seconds to the current date.
SELECT GETDATE() + (30.0 / (24 * 60 * 60)) AS '30 Seconds From Now';I obtained the expected output after executing the above query, as shown in the screenshot below.

Approach 3: Combining DATEADD with Other Date Functions
The DATEADD function works particularly well with other SQL Server date functions.
Example
Let’s say you want to add 2 hours to the start of the current day. We can execute the following query for that purpose.
DECLARE @StartOfDay DATETIME = CAST(CAST(GETDATE() AS DATE) AS DATETIME);
SELECT DATEADD(HOUR, 2, @StartOfDay) AS 'Two Hours After Midnight';After executing the above query, I got the expected output as shown in the screenshot below.

Comparison of Different Methods
Here’s a quick comparison of the different methods we’ve discussed:
| Method | Pros | Cons | Best For |
|---|---|---|---|
| DATEADD | Most readable, supports all time intervals | Slightly more verbose | Most scenarios, especially complex operations |
| Arithmetic | Concise for adding days | Less intuitive for hours/minutes/seconds | Simple day additions |
| Custom Functions | Can implement business logic | More complex to maintain | Special requirements like business days |
Conclusion
Adding time to dates in SQL Server is essential while working with SQL Server. While the DATEADD function provides the most flexible approach for most cases, knowing all the available approaches gives you the flexibility to choose the right approach for your specific needs.
- SQL Server Subtract Days From Date
- SQL Server Date Between
- SQL Server Date In Where Clause
- SQL Server Get Today’s Date
- SQL Server Extract Year From Date
- SQL Server Insert Date
After working for more than 15 years in the Software field, especially in Microsoft technologies, I have decided to share my expert knowledge of SQL Server. Check out all the SQL Server and related database tutorials I have shared here. Most of the readers are from countries like the United States of America, the United Kingdom, New Zealand, Australia, Canada, etc. I am also a Microsoft MVP. Check out more here.