Class DateTimeExtensions

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver.Linq

Assembly

MongoDB.Driver.dll

This static class holds methods that can be used to express MongoDB specific operations in LINQ queries.

public static class DateTimeExtensions

Inheritance

DateTimeExtensions

Inherited Members

Methods

Add(DateTime, long, DateTimeUnit)

Adds a value of the specified unit to a DateTime.

Add(DateTime, long, DateTimeUnit, string)

Adds a value of the specified unit to a DateTime taking a timezone into consideration.

Add(DateTime, TimeSpan, string)

Adds a TimeSpan value to a DateTime taking a timezone into consideration.

AddDays(DateTime, double, string)

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

AddHours(DateTime, double, string)

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

AddMilliseconds(DateTime, double, string)

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

AddMinutes(DateTime, double, string)

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

AddMonths(DateTime, int, string)

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

AddQuarters(DateTime, int)

Adds a value in quarters to a DateTime.

AddQuarters(DateTime, int, string)

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

AddSeconds(DateTime, double, string)

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

AddWeeks(DateTime, int)

Adds a value in weeks to a DateTime taking.

AddWeeks(DateTime, int, string)

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

AddYears(DateTime, int, string)

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

Subtract(DateTime, DateTime, DateTimeUnit)

Subtracts the start date from the end date returning the result in the specified unit.

Subtract(DateTime, DateTime, DateTimeUnit, string)

Subtracts the start date from the end date returning the result in the specified unit taking a timezone into consideration.

Subtract(DateTime, DateTime, string)

Subtracts the start date from the end date returning a TimeSpan taking a timezone into consideration.

Subtract(DateTime, long, DateTimeUnit)

Subtracts a value of the specified unit from a DateTime.

Subtract(DateTime, long, DateTimeUnit, string)

Subtracts a value of the specified unit from a DateTime taking a timezone into consideration.

Subtract(DateTime, TimeSpan, string)

Subtracts a TimeSpan from a date taking a timezone into consideration.

ToString(DateTime, string, string)

Converts a DateTime value to a string.

Truncate(DateTime, DateTimeUnit)

Truncates a DateTime value to the specified unit.

Truncate(DateTime, DateTimeUnit, long)

Truncates a DateTime value to the specified unit and bin size.

Truncate(DateTime, DateTimeUnit, long, string)

Truncates a DateTime value to the specified unit and bin size taking a timezone into consideration.

Week(DateTime)

Returns the week number of a specified DateTime value.

Week(DateTime, string)

Returns the week number of a specified DateTime value.