Home Cooker Classes Others Rice CookerGX
Classes  >  datetime  >  AddMinutes(int)
datetime class : AddMinutes(int) method

Description

Gets the new datetime instance which is obtained by adding the number of minutes to the invoker instance.

Syntax

datetimeInstance.AddMinutes(int numberOfMinutes)

Arguments

ClassNameDescription
intnumberOfMinutesNumber of minutes

Return value

ClassDescription
datetimeNew datetime type instance which is obtained by adding the argument.

Sample code

datetime dt = new datetime(2016, 3, 4, 4, 13, 0);

datetime addMinute1 = dt.AddMinutes(5);//2016/03/04 4:18:00

datetime addMinute2 = dt.AddMinutes(-5);//2016/03/04 4:08:00

Notes

It's a wrapper of the System.DateTime.AddMinutes(Double).

Links for reference

Copyright © Rice All rights reserved.