cDateTimeStatic

cDateTimeStatic


Represents methods to create cDateTime objects from various data sources.


Remarks

These methods are considered static. The cDateTimeStatic cannot be directly instantiated. Use these methods withe cDateTime.* syntax.

 Dim dt As cDateTime
 Set dt = cDateTime.FromOADate(#1/1/2001 8:30:00 AM#)

  A quicker way to create a cDateTime object is to use the NewDate method.
 Set dt = NewDate(#1/1/2001 8:30:00 AM#)
 
This will create a new instance of cDateTime with the supplied date value.

See Also

Project VBCorLib Overview | cDateTime

Public:

Types:

NameDescription
 DateTimeKindUsed to specify the type of cDateTime object. 
 DayOfWeekThis enumeration represents the days of the week as used by cDateTime and Calendars. 

Properties:

NameDescription
 MaxValue (get)Returns the maximum cDateTime representation. 
 MinValue (get)Returns the minimum cDateTime representation. 

Methods:

NameDescription
 DaysInMonthReturns the number of days in a Gregorian calendar month. 
 FromBinaryCreates a cDateTime object from a 64-bit currency value. 
 FromFileTimeCreates a cDateTime object from an operating system file timestamp. 
 FromFileTimeUtcReturns a cDateTime object from a FileTime value. 
 FromMillisecondsReturns a cDateTime object from milliseconds. 
 FromOADateReturns a cDateTime object from a VB Date value. 
 IsLeapYearReturns a boolean indicating if the specific Gregorian year is a leap year. 
 NowReturns a cDateTime that represents the current time on the local machine. 
 ParseParses a string representation of a date into a cDateTime object. 
 SpecifyKindCreates a new cDateTime object with the specified DateTimeKind. 
 TodayReturns a cDateTime that represents only the current date. The time portion is not present. 
 TryParseAttempts to parse a string representation of a date into a cDateTime object. 
 UtcNowReturns a cDateTime that represents the current time with the UTC offset.