Add Hours and Minute to Date Time in C# – Programming Code Examples
ASP.NET C#

Add Hours and Minute to Date Time in C#2 min read

DateTime.AddMinutes() method exists in System namespace. AddMinutes() method have a required parameter named ‘value’. This ‘value’ parameter value data type is System.Double which represent a number of whole and fractional minutes. This is very interesting that the ‘value’ parameter value can be negative or positive. So, technically we can also subtract minutes from a DateTime object.

DateTime.AddMinutes() method exists in System namespace. AddMinutes() method have a required parameter named ‘value’. This ‘value’ parameter value data type is System.Double which represent a number of whole and fractional minutes. This is very interesting that the ‘value’ parameter value can be negative or positive. So, technically we can also subtract minutes from a DateTime object.




Add hours and minutes:

Add hours/minute to datetime variable in C#

Add hours/minute to datetime variable in C#

ASP.NET Code:

 

Leave a Comment