LCDatetime のコンストラクタです。新しい LCDatetime オブジェクトを初期化します。
LCDatetime
Dim variableName As New LCDatetime(Year, Month, Day, Hour, Minute, Second, Hundredth, Zone, DST)
パラメータはすべてオプションです。パラメータをすべて省略した場合は、オブジェクトには特別な「null」値が設定され、オブジェクトの Text プロパティは "" を返します。 null 値の作成の詳細については、この後のセクション「null 値の LCDatetime オブジェクトを作成する」を参照してください。
パラメータ |
説明 |
---|---|
Year |
Long。1 ~ 32767 の値。デフォルトは 0 です。 |
Month |
Long。1 ~ 12 の値。デフォルトは 0 です。 |
Day |
Long。1 ~ 31 の値。デフォルトは 0 です。 |
Hour |
Long。0 ~ 23 の値。デフォルトは 0 です。 |
Minute |
Long。0 ~ 59 の値。デフォルトは 0 です。 |
Second |
Long。0 ~ 59 の値。デフォルトは 0 です。 |
Hundredth |
Long。0 ~ 99 の値。デフォルトは 0 です。 |
Zone |
Long。-11 ~ 11 のタイムゾーンを示す値。デフォルトは GMT です。 |
DST |
Variant 型。Boolean 型。サマータイムが実施されている場合は True です。デフォルトは False です。 |
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
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