This documentation is archived and is not being maintained.
DateAndTime Class
Visual Studio 2010
The DateAndTime module contains the procedures and properties used in date and time operations.
Assembly: Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
The DateAndTime type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | DateString | Returns or sets a String value representing the current date according to your system. |
![]() ![]() | Now | Returns a Date value containing the current date and time according to your system. |
![]() ![]() | TimeOfDay | Returns or sets a Date value containing the current time of day according to your system. |
![]() ![]() | Timer | Returns a Double value representing the number of seconds elapsed since midnight. |
![]() ![]() | TimeString | Returns or sets a String value representing the current time of day according to your system. |
![]() ![]() | Today | Returns or sets a Date value containing the current date according to your system. |
| Name | Description | |
|---|---|---|
![]() ![]() | DateAdd(DateInterval, Double, DateTime) | Returns a Date value containing a date and time value to which a specified time interval has been added. |
![]() ![]() | DateAdd(String, Double, Object) | Returns a Date value containing a date and time value to which a specified time interval has been added. |
![]() ![]() | DateDiff(DateInterval, DateTime, DateTime, FirstDayOfWeek, FirstWeekOfYear) | Returns a Long value specifying the number of time intervals between two Date values. |
![]() ![]() | DateDiff(String, Object, Object, FirstDayOfWeek, FirstWeekOfYear) | Returns a Long value specifying the number of time intervals between two Date values. |
![]() ![]() | DatePart(DateInterval, DateTime, FirstDayOfWeek, FirstWeekOfYear) | Returns an Integer value containing the specified component of a given Date value. |
![]() ![]() | DatePart(String, Object, FirstDayOfWeek, FirstWeekOfYear) | Returns an Integer value containing the specified component of a given Date value. |
![]() ![]() | DateSerial | Returns a Date value representing a specified year, month, and day, with the time information set to midnight (00:00:00). |
![]() ![]() | DateValue | Returns a Date value containing the date information represented by a string, with the time information set to midnight (00:00:00). |
![]() ![]() | Day | Returns an Integer value from 1 through 31 representing the day of the month. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | Hour | Returns an Integer value from 0 through 23 representing the hour of the day. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | Minute | Returns an Integer value from 0 through 59 representing the minute of the hour. |
![]() ![]() | Month | Returns an Integer value from 1 through 12 representing the month of the year. |
![]() ![]() | MonthName | Returns a String value containing the name of the specified month. |
![]() ![]() | Second | Returns an Integer value from 0 through 59 representing the second of the minute. |
![]() ![]() | TimeSerial | Returns a Date value representing a specified hour, minute, and second, with the date information set relative to January 1 of the year 1. |
![]() ![]() | TimeValue | Returns a Date value containing the time information represented by a string, with the date information set to January 1 of the year 1. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() ![]() | Weekday | Returns an Integer value containing a number representing the day of the week. |
![]() ![]() | WeekdayName | Returns a String value containing the name of the specified weekday. |
![]() ![]() | Year | Returns an Integer value from 1 through 9999 representing the year. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:
