Skip to content

Calendar.Add

Overview

DateTimeOffset Calendar.Add ( dateTime, hours )
Adds specified number of hours to specified date time value and returns.

Arguments

DateTimeOffset dateTime Specifies the base date time value.

Number hours Specifies the how many hours will be added to dateTime parameter.

Remarks

Examples

var newDate = $Calendar.Add($Calendar.Today, 4); //adds 4 hours to the current date and returns the result as a DateTimeOffset object.

See Also