DateTime

Description

The DateTime class represents date and time.

Properties of the DateTime Class

  Property name Brief description
MaxValue The MaxValue property returns the maximum value of the DateTime type.
MinValue The MinValue property returns the minimum value of the DateTime type.
Ticks The Ticks property returns the number of milliseconds since the operating system startup.
Ticks64 The Ticks64 property returns the number of milliseconds since the operating system startup on the long work.
TimeZoneBias The TimeZoneBias property returns offset of the current time from the universal time coordinate (UTC).
TimeZoneName The TimeZoneName property returns name of the current time zone.

Methods of the DateTime Class

  Method name Brief description
Add The Add method increases the date by the specified value.
AddDays The AddDays method adds the specified number of days to the initial date.
AddHours The AddHours method adds the specified number of hours to the initial date.
AddMilliseconds The AddMilliseconds method adds the specified number of milliseconds to the initial date.
AddMinutes The AddMinutes method adds the specified number of minutes to the initial date.
AddMonths The AddMonths method adds the specified number of months to the initial date.
AddSeconds The AddSeconds method adds the specified number of seconds to the initial date.
AddYears The AddYears adds the specified number of years to the initial date.
Compose The Compose method creates a date and time value from the specified input parameters.
ComposeDay The ComposeDay method creates a value of time from the specified input parameters.
ComposeTimeOfDay The ComposeTimeOfDay method creates a value of time from the specified input parameters.
DaysInMonth The DaysInMonth method returns the number of days in the specified month of the specified year.
Difference The Difference method calculates difference between start and end date.
FromDouble The FromDouble method returns the date and time value obtained by conversion from the Double format.
IsLeapYear The IsLeapYear method returns the leap year attribute.
Now The Now returns current date and time.
Parse The Parse method converts a string into the DateTime type without validation.
Subtract The Subtract method decreases the date by the specified value.
Today The Today method returns the current date.
TryParse The TryParse method converts a string into the DateTime type with validation.

Properties of Variables of the DateTime Type

  Property name Brief description
Date The Date property returns the date component from the current variable.
Day The Day property returns the day of the month from the current variable.
DayOfWeek The DayOfWeek property returns the day of the week from the current variable.
DayOfYear The DayOfYear property returns the number of the day of the current variable starting from the beginning of the year.
Hour The Hour property returns the number of hours from the current variable.
Millisecond The Millisecond property returns the number of milliseconds in the current variable.
Minute The Minute property returns the number of minutes from the current variable.
Month The Month property returns the number of the month from the current variable.
Second The Second property returns the number of seconds from the current variable.
TimeOfDay The TimeOfDay property returns the time component from the current variable.
ToDouble The ToDouble property returns the date value in the Double format.
ToString The ToString property returns the value of the current variable converted into string type.
Year The Year property returns the number of the year from the current variable.

See also:

System Assembly Classes