DateTime
Provides static utility methods for manipulating instances of DateTime.
Provides static method to validate date strings.
Provides methods for converting dates to strings.
public DateTime()
Formats the provided string representation of a date, optionally converting it to local time.
Gets a formatted string of the time elapsed between the two provided dates. String format: "HH:MM:SS"
Gets a date from the provided range description, optionally in UTC time.
Gets a date from the provided range description and date.
Gets the month name associated with the specified index.
Indicates whether or not the the provided object is a date in the current culture.
Indicates whether or not the the provided object is a date in the specified culture.
Returns the larger of the two provided dates.
Returns the smaller of the two provided dates.
Gets the number of months between the first and second date, inclusive.
E.g. June 2005 compared against July 2006 = 14 months difference.
public static int MonthOverlap(DateTime startDateOne, DateTime endDateOne, DateTime startDateTwo, DateTime endDateTwo)
Calculates the number of months, inclusive, between the later starting date and the earlier ending date.
E.g. 'May 2015 - December 2015' and 'July 2015 - February 2016' -> 6 months overlap.
Parses a culture-neutral sql-formatted string into a date, no globalization.
Parses a culture-neutral sql-formatted string into a date, with globalization.
Parses a culture-neutral sql-formatted string into a date, optionally converted to local time.
Gets the culture-neutral .net-formatted string representation of the provided date.
Gets the culture-neutral sql-formatted string representation of the provided date.
Gets the number of years between the first and second date, inclusive.
E.g. June 2005 compared against July 2006 = 2 years difference.