[API]
GetTimeFormatA
GetTimeFormatW

[CODE]
Public Function GetTimeFormat(lpTime As SYSTEMTIME, Optional ByVal xMode As Long = 0&) As String
  Dim xLong1 As Long
  
  If IsUnicode Then
    xLong1 = GetTimeFormatW(1024&, xMode, lpTime, 0&, ptrTemp, ptrTempSizeXW)
    Else
    xLong1 = GetTimeFormatA(1024&, xMode, lpTime, 0&, ptrTemp, ptrTempSizeX)
    End If
  If xLong1 > 0& Then GetTimeFormat = PeekS(ptrTemp, xLong1)
  End Function
