[API]
GetDateFormatA
GetDateFormatW

[INCLUDE]
GenericInit

[CODE]
Public Function GetDateFormat(lpDate As SYSTEMTIME, Optional ByVal xMode As Long = 1&) As String
  Dim xLong1 As Long
  
  If IsUnicode Then
    xLong1 = GetDateFormatW(1024&, xMode, lpDate, 0&, ptrTemp, ptrTempSizeXW)
    Else
    xLong1 = GetDateFormatA(1024&, xMode, lpDate, 0&, ptrTemp, ptrTempSizeX)
    End If
  If xLong1 > 0& Then GetDateFormat = PeekS(ptrTemp, xLong1)
  End Function
