In C#, DateTime.AddMinutes moves a date and time forward or back by minutes. The argument is a double, so 0.5 means thirty seconds.
It is perfect for meeting slots, reminders, and short timers. If the minutes pass midnight, the date part changes automatically.
This is an instance member of System.DateTime. You call it on a DateTime value, such as dt.AddMinutes(...). DateTime is a struct, so every value is copied and never changed in place.
Syntax
Pass the number of minutes to AddMinutes.
C#
DateTime dt = new DateTime(2026, 11, 18, 14, 30, 45);
DateTime a = dt.AddMinutes(45); // 15:15:45
DateTime b = dt.AddMinutes(-31); // 13:59:45
DateTime c = dt.AddMinutes(0.5); // 14:31:15
Call
What it does
dt.AddMinutes(45)
Forty-five minutes later.
dt.AddMinutes(-31)
Thirty-one minutes earlier, which crosses an hour mark.
dt.AddMinutes(0.5)
Thirty seconds later.
Use AddMinutes inside a loop to build time slots. Keep the start value separate so each slot is computed from the same base.
Library declarations
C#
public DateTime AddMinutes(double value);
Parameters
Parameter
Description
value
Required. Number of minutes to add. Negative values go backward; fractions are allowed.
Return Value
Return Value
Description
DateTime
A new DateTime shifted by value minutes, with the same Kind.
C# Examples
Example 1 — Shift by Minutes
Add 45 minutes and subtract 31 minutes from a fixed time.
C#
using System;
using System.Globalization;
class Program {
static string Show(DateTime d) => d.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
static void Main() {
DateTime dt = new DateTime(2026, 11, 18, 14, 30, 45);
Console.WriteLine(Show(dt.AddMinutes(45)));
Console.WriteLine(Show(dt.AddMinutes(-31)));
}
}
Output
2026-11-18 15:15:45
2026-11-18 13:59:45
How It Works
Plus 45. 14:30 plus 45 minutes is 15:15; seconds stay 45.
Minus 31. 14:30 minus 31 minutes goes under the hour, to 13:59.
Hour carries. The hour value changes by itself when minutes overflow or underflow.
Seconds untouched. Whole minutes never alter the 45 seconds.
Example 2 — Cross to the Next Day
Add 90 minutes late in the evening.
C#
using System;
using System.Globalization;
class Program {
static string Show(DateTime d) => d.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
static void Main() {
DateTime late = new DateTime(2026, 11, 18, 23, 0, 0);
DateTime next = late.AddMinutes(90);
Console.WriteLine(Show(next));
Console.WriteLine(next.Day);
}
}
Output
2026-11-19 00:30:00
19
How It Works
Late start. The time is 23:00 on November 18.
90 minutes. One hour reaches midnight and 30 more minutes follow.
New day. The result belongs to November 19 at 00:30.
Day property.next.Day prints 19, proving the date part moved forward.
Example 3 — Build Appointment Slots
Create four 20-minute slots starting at 09:00.
C#
using System;
using System.Globalization;
class Program {
static void Main() {
DateTime start = new DateTime(2026, 11, 18, 9, 0, 0);
for (int i = 0; i < 4; i++) {
DateTime slot = start.AddMinutes(i * 20);
Console.WriteLine(slot.ToString("HH:mm", CultureInfo.InvariantCulture));
}
}
}
Output
09:00
09:20
09:40
10:00
How It Works
One base value.start stays at 09:00 for the whole loop.
Multiply the step.i * 20 gives 0, 20, 40, and 60 minutes.
No drift. Each slot is computed from the base, so rounding errors cannot pile up.
HH:mm output. The 24-hour pattern shows the slots as simple clock times.
Frequently Asked Questions
Yes. AddMinutes(0.5) adds thirty seconds.
Yes. When minutes overflow past 59 or go below 0, the hour (and the date) update automatically.
Keep one start value and call start.AddMinutes(i * step) inside a loop.
Yes. Both return the same value.
No. DateTime is immutable, so use the returned value.