cDateTime

cDateTime


Represents a point in time.


Remarks

The cDateTime class can represent a point in time from 1/1/0001 12:00:00 AM to 12/31/9999 11:59:59 PM. The time is represented in a gregorian calendar set.

 Dim dt As cDateTime
 Set dt = NewDate(#1/1/2005 8:30:00AM#")
 
@see Constructors @see cDateTimeStatic @see DateTimeFormatInfo @see TimeSpan @see IComparable @see IFormattable

See Also

Project VBCorLib Overview

Implements:

IComparable 
IFormattable 
IObject 

Public:

Properties:

NameDescription
 DateOnly (get)Returns the date portion of the current date representation. 
 Day (get)Returns the Day part of the current date representation. 
 DayOfWeek (get)Returns the day of the week for the current date. 
 DayOfYear (get)Returns the day within the calendar year. 
 Hour (get)Returns the Hour part of the current date representation. 
 IsDayLightSavingsTime (get)Returns if this cDateTime instance is currently in daylight savings time. 
 Kind (get)Returns the kind of cDateTime. 
 Millisecond (get)Returns the Millisecond part of the current date representation. 
 Minute (get)Returns the Minute part of the current date representation. 
 Month (get)Returns the Month part of the current date representation. 
 Second (get)Returns the Second part of the current date representation. 
 Ticks (get)Returns the whole date represented in ticks. 
 TimeOfDay (get)Returns the time portion of the current date representation. 
 TotalMilliseconds (get)Returns the whole date represented in milliseconds. 
 Year (get)Returns the Year part of the current date representation. 

Methods:

NameDescription
 AddAdds a specified amount of time to the current date, returning a new cDateTime instance with the calcuated value. 
 AddDaysAdds a specified number of days to the current date, returning a new cDateTime instance with the calcuated value. 
 AddHoursAdds a specified number of hours to the current date, returning a new cDateTime instance with the calcuated value. 
 AddMillisecondsAdds a specified number of milliseconds to the current date, returning a new cDateTime instance with the calcuated value. 
 AddMinutesAdds a specified number of minutes to the current date, returning a new cDateTime instance with the calcuated value. 
 AddMonthsAdds a specified number of months to the current date, returning a new cDateTime instance with the calcuated value. 
 AddSecondsAdds a specified number of seconds to the current date, returning a new cDateTime instance with the calcuated value. 
 AddTicksAdds a specified number of ticks to the current date, returning a new cDateTime instance with the calcuated value. 
 AddYearsAdds a specified number of years to the current date., returning a new cDateTime instance with the calcuated value. 
 CompareToCompares this instance to a passed in cDateTime instance. 
 EqualsReturns a boolean indicating if the value and this object instance are the same date. 
 EqualToDetermines if this instance is equal to another cDateTime object. 
 GetHashCodeReturns a pseudo-unique number identifying this instance. 
 GreaterThanDetermines if this instance is greater than another cDateTime object. 
 GreaterThanOrEqualToDetermines if this instance is greater than or equal to another cDateTime object. 
 LessThanDetermines if this instance is less than another cDateTime object. 
 LessThanOrEqualToDetermines if this instance is less than or equal to another cDateTime object. 
 NotEqualToDetermines if this instance is not equal to another cDateTime object. 
 SubtractSubtracts either a cDateTime instance or a TimeSpan instance from this cDateTime instance. 
 ToBinaryReturns a 64-bit representation of the time and kind. 
 ToFileTimeConverts the cDateTime to a FileTime representation, adjusting for timezone. 
 ToFileTimeUtcConverts the cDateTime to a FileTime representation, ignoring the timezone offset. 
 ToLocalTimeReturns a cDateTime with the timezone offset applied to this instance. 
 ToLongDateStringReturns the date formatted to the current cultures long date pattern. 
 ToLongTimeStringReturns the time formatted to the current cultures long time pattern. 
 ToOADateConverts the current instance to an Ole Automation date representation that is normally used in Visual Basic. 
 ToShortDateStringReturns the date formatted to the current cultures short date pattern. 
 ToShortTimeStringReturns the time formatted to the current cultures short time pattern. 
 ToStringReturns a string representation of this object instance. 
 ToUniversalTimeReturns a cDateTime with the timezone offset removed from this instance.