Oh, and I forgot to say to change the userlib declaration of date$ to date*.
Here's and example that works in B3D (with a generic bank to string function):
Here's and example that works in B3D (with a generic bank to string function):
;.lib "Kernel32.dll" ;GetDate%(iLocale%, iFlags%, iDate%, iFormat$, oDate*, iSizeBuf%):"GetDateFormatA" ;GetDateAny%(locale%, dwFlags%, lpDate*, lpFormat$, lpDateStr*, size%):"GetDateFormatA" day = CreateBank(150) GetDate(0, 0, 0, "d dd ddd dddd M MM MMM MMMM y yy yyyy gg", day, BankSize(day)) Print Out(day) time = CreateBank(16) PokeShort(time, 0, 2004) ; Year PokeShort(time, 2, 4) ; Month PokeShort(time, 6, 17) ; Day GetDateAny(0, 0, time, "ddd MM-dd-yy", day, BankSize(day)) Print Out(day) Function Out$(b) For i = 0 To BankSize(b)-1 a=PeekByte(b,i) If a=0 Then Exit s$=s$+Chr(a) Next Return s$ End Function