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

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close