New Method for LCDatetime

This is the constructor for LCDatetime. It initializes a new LCDatetime object.

Defined In

LCDatetime

Syntax

Dim variableName As New LCDatetime(Year, Month, Day, Hour, Minute, Second, Hundredth, Zone, DST)

Parameters

All parameters are optional. If you omit all of them, the object will have a special "null" value, whose Text property returns "". For more information about creating a null value, see teh section entitled "Creating an LCDatetime Object with a Null Value" later in this section.

Parameter

Description

Year

Long. Value in the range 1-32767. Default is 0.

Month

Long. A value in the range 1-12. Default is 0.

Day

Long. A value in the range 1-31. Default is 0.

Hour

Long. A value in the range 0-23. Default is 0.

Minute

Long. A value in the range 0-59. Default is 0.

Second

Long. A value in the range 0-59. Default is 0.

Hundredth

Long. A value in the range 0-99. Default is 0.

Zone

Long. A value representing the time zone in the range -11 to 11. Default is GMT.

DST

Variant. Boolean. Daylight savings time is in effect when true. Default is False.

Example

Uselsx "*lsxlc"  
Sub Initialize
  Dim clock As New LCDatetime ' default null time value
  Dim cutoff As New LCDatetime(2002, 4, 15, 23, 59, 59, 99)
  Print "U.S. Income Tax Mailing last minute deadline is " & cutoff.Text
  Print "clock = " & clock.Text
  Call clock.SetCurrent
  Print "now clock = " & clock.Text
End Sub

Example Output

U.S. Income Tax Mailing last minute deadline is 04/15/2002 11:59:59.99 PM
clock =
now clock = 03/13/2002 05:11:24.56 PM