Table of Contents

Method AddWeeks

Namespace
MongoDB.Driver.Linq
Assembly
MongoDB.Driver.dll

AddWeeks(DateTime, int)

Adds a value in weeks to a DateTime taking.

public static DateTime AddWeeks(this DateTime @this, int value)

Parameters

this DateTime

The original DateTime.

value int

The value to be added.

Returns

DateTime

The resulting DateTime.

AddWeeks(DateTime, int, string)

Adds a value in weeks to a DateTime taking a timezone into consideration.

public static DateTime AddWeeks(this DateTime @this, int value, string timezone)

Parameters

this DateTime

The original DateTime.

value int

The value to be added.

timezone string

The timezone.

Returns

DateTime

The resulting DateTime.

Remarks

See the server documentation for $dateAdd for information on timezones in MongoDB.