Declare Integer UuidCreate In 'RPCRT4.dll' String @pguid Declare Integer StringFromGUID2 In 'Ole32.dll' ; string rguid, String @lpsz, Integer cchMax procedure myGuid Local pGUID,rGUID pGUID=Replicate(Chr(0),16) *rGUID=Replicate(Chr(0),80) UuidCreate(@pGUID) return m.pGUID *StringFromGUID2(pGUID,@rGUID,40) *RETURN CHRTRAN(Strconv(Left(rGUID,76),6),'{}','') endprocPS: It is hard to believe mySQL doesn't store subsecond information (SQL server have a resolution up to 3 milliseconds as far as I know).