LCDatetime の Clear メソッド

このメソッドは、既に設定されている Datetime の値をクリアします。これにより、コンストラクタの引数を指定せずに LCDatetime を新規作成したときと同じ値が設定されます。

定義位置

LCDatetime

構文

Call dateTimeObject.Clear

Option Public
Uselsx "*lsxlc"  
Sub Initialize
  Dim Clock As New LCDateTime (1999, 12, 31, 23, 59, 59, 99)
  Clock.Clear
  If (Clock.Text = "") Then
    Print "The time has been cleared."
  Else
    Print "The time is " & Clock.Text
  End If
End Sub

出力例

The time has been cleared.