thanks, thought it was me (mistyping). so the other function that doesn't work is a doozy for me.
the function thats tripping me up is below:
Private Function GetTimeDelimiter() As String
Dim lngLCID As Long
Dim lngLen As Long
Dim strBuffer As String
Const MAX_CHARS = 4
lngLCID = GetSystemDefaultLCID()
strBuffer = Space(MAX_CHARS + 1)
lngLen = GetLocalInfo(lngLCID, LOCAL_STIME, strBuffer, Len(strBuffer))
GetTimeDelimiter = Left$(strBuffer, lngLen - 1)
End Function
the procedure that i am running is:
Sub test_FI_nw()
'this needs GetSystemDefaultLCID & GetLocalInfo which seem to be unsupported on microsoft's site
Dim dtmStart As Date
Dim dtmEnd As Date
On Error GoTo ErrHandler:
dtmStart = #1/1/2019 12:00:00 PM#
dmtEnd = #3/27/2019 8:10:45 AM#
Debug.Print dhFormatInterval(dtmStart, dtmEnd, "D H")
Debug.Print dhFormatInterval(dtmStart, dtmEnd, "D H M")
Debug.Print dhFormatInterval(dtmStart, dtmEnd, "D H M S")
Debug.Print dhFormatInterval(dtmStart, dtmEnd, "D H:MM")
Debug.Print dhFormatInterval(dtmStart, dtmEnd, "D HH:MM")
Debug.Print dhFormatInterval(dtmStart, dtmEnd, "D HH:MM:SS")
Debug.Print dhFormatInterval(dtmStart, dtmEnd, "H M")
Debug.Print dhFormatInterval(dtmStart, dtmEnd, "H:MM")
Debug.Print dhFormatInterval(dtmStart, dtmEnd, "H:MM:SS")
Debug.Print dhFormatInterval(dtmStart, dtmEnd, "M S")
Debug.Print dhFormatInterval(dtmStart, dtmEnd, "M:SS")
ErrHandler:
End Sub
it complains that "GetSystemDefaultLCID" and "GetLocalInfo" are not defined. from reading the text i understand that these are api calls. i googled the internet for both functions but came up empty (microsoft says they are depreciated i think). is there a way to declare the api function calls in the declaration section?
Bookmarks