Click or drag to resize

DateTimeExtensions Class

This static class holds methods that can be used to express MongoDB specific operations in LINQ queries.
Inheritance Hierarchy
SystemObject
  MongoDB.Driver.LinqDateTimeExtensions

Namespace:  MongoDB.Driver.Linq
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.20.0+ee01960089f28ea1b501690df5fc9f6318a70242
Syntax
public static class DateTimeExtensions

The DateTimeExtensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAdd(DateTime, Int64, DateTimeUnit)
Adds a value of the specified unit to a DateTime.
Public methodStatic memberAdd(DateTime, TimeSpan, String)
Adds a TimeSpan value to a DateTime taking a timezone into consideration.
Public methodStatic memberAdd(DateTime, Int64, DateTimeUnit, String)
Adds a value of the specified unit to a DateTime taking a timezone into consideration.
Public methodStatic memberAddDays
Adds a value in days to a DateTime taking a timezone into consideration.
Public methodStatic memberAddHours
Adds a value in hours to a DateTime taking a timezone into consideration.
Public methodStatic memberAddMilliseconds
Adds a value in milliseconds to a DateTime taking a timezone into consideration.
Public methodStatic memberAddMinutes
Adds a value in minutes to a DateTime taking a timezone into consideration.
Public methodStatic memberAddMonths
Adds a value in months to a DateTime taking a timezone into consideration.
Public methodStatic memberAddQuarters(DateTime, Int32)
Adds a value in quarters to a DateTime.
Public methodStatic memberAddQuarters(DateTime, Int32, String)
Adds a value in quarters to a DateTime taking a timezone into consideration.
Public methodStatic memberAddSeconds
Adds a value in seconds to a DateTime taking a timezone into consideration.
Public methodStatic memberAddWeeks(DateTime, Int32)
Adds a value in weeks to a DateTime taking.
Public methodStatic memberAddWeeks(DateTime, Int32, String)
Adds a value in weeks to a DateTime taking a timezone into consideration.
Public methodStatic memberAddYears
Adds a value in years to a DateTime taking a timezone into consideration.
Public methodStatic memberSubtract(DateTime, DateTime, DateTimeUnit)
Subtracts the start date from the end date returning the result in the specified unit.
Public methodStatic memberSubtract(DateTime, DateTime, String)
Subtracts the start date from the end date returning a TimeSpan taking a timezone into consideration.
Public methodStatic memberSubtract(DateTime, Int64, DateTimeUnit)
Subtracts a value of the specified unit from a DateTime.
Public methodStatic memberSubtract(DateTime, TimeSpan, String)
Subtracts a TimeSpan from a date taking a timezone into consideration.
Public methodStatic memberSubtract(DateTime, DateTime, DateTimeUnit, String)
Subtracts the start date from the end date returning the result in the specified unit taking a timezone into consideration.
Public methodStatic memberSubtract(DateTime, Int64, DateTimeUnit, String)
Subtracts a value of the specified unit from a DateTime taking a timezone into consideration.
Public methodStatic memberToString
Converts a DateTime value to a string.
Public methodStatic memberTruncate(DateTime, DateTimeUnit)
Truncates a DateTime value to the specified unit.
Public methodStatic memberTruncate(DateTime, DateTimeUnit, Int64)
Truncates a DateTime value to the specified unit and bin size.
Public methodStatic memberTruncate(DateTime, DateTimeUnit, Int64, String)
Truncates a DateTime value to the specified unit and bin size taking a timezone into consideration.
Public methodStatic memberWeek(DateTime)
Returns the week number of a specified DateTime value.
Public methodStatic memberWeek(DateTime, String)
Returns the week number of a specified DateTime value.
Top
See Also