CorDateTimeStatic

CorDateTimeStatic


Represents methods to create CorDateTime objects from various data sources.


Public:

Types:

NameDescription
 DateTimeKind Used to specify the type of CorDateTime object.  
 DayOfWeek This enumeration represents the days of the week as used by CorDateTime and Calendars.  

Properties:

NameDescription
 MaxValue (get) Returns the maximum CorDateTime representation.  
 MinValue (get) Returns the minimum CorDateTime representation.  
 Now (get) Returns a CorDateTime that represents the current time on the local machine.  
 Today (get) Returns a CorDateTime that represents only the current date. The time portion is not present.  
 UtcNow (get) Returns a CorDateTime that represents the current time with the UTC offset.  

Methods:

NameDescription
 DaysInMonth Returns the number of days in a Gregorian calendar month.  
 Equals Returns a value indicating whether two Date or CorDateTime instances have the same date and time value.  
 FromBinary Creates a CorDateTime object from a 64-bit currency value.  
 FromFileTime Creates a CorDateTime object from an operating system file timestamp.  
 FromFileTimeUtc Returns a CorDateTime object from a FileTime value.  
 FromMilliseconds Returns a CorDateTime object from milliseconds.  
 FromOADate Returns a CorDateTime object from a VB Date value.  
 IsLeapYear Returns a boolean indicating if the specific Gregorian year is a leap year.  
 Parse Parses a string representation of a date into a CorDateTime object.  
 SpecifyKind Creates a new CorDateTime object with the specified DateTimeKind.  
 TryParse Attempts to parse a string representation of a date into a CorDateTime object.  

Remarks

These methods are considered static. The CorDateTimeStatic cannot be directly instantiated. to access the methods use the CorDateTime qualifier (e.g. CorDateTime.MaxValue.)

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

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

See Also

Project CorLib Overview

Class CorDateTimeStatic Overview

CorDateTime