Manage Learn to apply best practices and optimize your operations.

Millisecond -- Get Time to Millisecond

If you need to get the time down to the millisecond here is a small agent to do that. It uses a windows API call.


Option Public

Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type
Declare Sub GetLocalTime Lib "kernel32.dll" (lpSystemTime As SYSTEMTIME)
Dim localtime As SYSTEMTIME

Sub Initialize
Call GetLocalTime(localtime)
Print "Year " & Cstr(localtime.wYear)
Print "Month " & Cstr(localtime.wMonth)
Print "DOW " & Cstr(localtime.wDayOfWeek)
Print "Day " & Cstr(localtime.wDay)
Print "Hour " & Cstr(localtime.wHour)
Print "Minute " & Cstr(localtime.wMinute)
Print "Second " & Cstr(localtime.wSecond)
Print "MILLISECOND " & Cstr(localtime.wMilliseconds)
End Sub

Dig Deeper on Domino Resources - Part 5

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close