Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Milliseconds
Message
De
10/11/2009 02:30:25
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
09/11/2009 22:09:07
Aldrich Arendsz
Gamma Research Inc.
Aruba
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Divers
Thread ID:
01433836
Message ID:
01433955
Vues:
55
>Hi Alex,
>
>unfortunately MySQL doesn't store sub-second info so far I can see in the documentations found on the internet.
>However I could get a resolution of millisecond by using :
>DECLARE GetLocalTime IN kernel32 STRING @ lpSystemTime
>
>Substracting the information with a string to word converter to get the info needed,
>which for now can get me going.
>
>Thx for your help.
>
>Rgds,
>
>Aldrich

Since you want this to "mark" a record (as SQL server misnamed timestamp does) what about instead using a 16 bytes GUID? It would be simple to generate yet unique. ie:
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),'{}','')
endproc
PS: 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).

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform