The following example uses the Date Time method to generate an array of date and time strings.

after one month of dating-23after one month of dating-85after one month of dating-1

The format of the string representation must match at least one of the specified formats exactly or an exception is thrown.

equivalent using the specified format, culture-specific format information, and style.

The format of the string representation must match the specified format exactly.

The method returns a value that indicates whether the conversion succeeded.

equivalent using the specified array of formats, culture-specific format information, and style. E.) in the Gregorian Calendar calendar (excluding ticks that would be added by leap seconds).

The format of the string representation must match at least one of the specified formats exactly. Time values are measured in 100-nanosecond units called ticks, and a particular date is the number of ticks since midnight, January 1, 0001 A. For example, a ticks value of 31241376000000000L represents the date, Friday, January 01, 0100 midnight.The method returns a value that indicates whether the conversion succeeded. NET Framework source code for this type, see the Reference Source. A In this section: Instantiating a Date Time object Date Time values and their string representations Converting strings to Date Time values Version considerations Date Time values Date Time operations Date Time resolution Date Time vs.You can browse through the source code online, download the reference for offline viewing, and step through the sources (including patches and updates) during debugging; see instructions. Time Span Date Time values and calendars Persisting Date Time values COM interop considerations value is the result of a formatting operation.value type represents dates and times with values ranging from (midnight), January 1, 0001 Anno Domini (Common Era) through P. Formatting is the process of converting a value to its string representation.Because the appearance of date and time values is dependent on such factors as culture, international standards, application requirements, and personal preference, the method returns the string representation of the date and time in a format defined by a standard or custom format specifier and using the formatting conventions of the current culture.The following example uses the Date Time method returns the string representation of the date and time in a format defined by a specific format specifier and using the formatting conventions of a specific culture.