IBM Lotus Symphony
|
午前 0 時を基点とする経過時間を秒数で返します。
![]() |
Timer 関数を呼び出す場合は、あらかじめ定義しておいた「ロング整数」型の変数に戻り値を返させる必要があります。そうでない場合は、時刻ではなく日付が返されます。 |
Timer
日付
Sub ExampleTimer
Dim lSec as long,lMin as long,lHour as long
lSec = Timer
MsgBox lSec,0,"Seconds since midnight"
lMin = lSec/60
lSec = lSec Mod 60
lHour = lMin/60
lMin = lMin Mod 60
MsgBox Right("00" & lHour , 2) & ":"& Right("00" & lMin , 2) & ":"& Right("00" & lSec , 2) ,0,"The time is"
end sub