Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I need to change de system date from FOXPROW 2.6
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00007003
Message ID:
00007060
Vues:
28
>Try this code, which assumes you've got wYear, wMonth, ... and so on:
>DECLARE integer SetSystemTime IN Win32API AS SetSysTime STRING @_lpst
>st = CHR(wYear%256) + CHR(wYear/256) + ;
>     CHR(wMonth) + CHR(0) + ;
>     CHR(0)+CHR(0) + ;
>     .
>     .
>     .
>IF (LEN(st) < 16)
>  st = padr(st, 16, chr(0))  && pad with zeros just to be safe
>ENDIF
>** now call SetSysTime()
>SetSysTime(@st);
>
BTW, the code was meant for VFP 3.0, and is untested even for it. Unfortunately I can't help you with FPW 2.6, and also do please tell me if
it doesn't work.

HTH!
alistair israel
Distressed DBA, Sleepy SysAd, Weary WebMaster (aka Senior Software Engineer)
aisrael@poboxes.com
Makati City, Philippines
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform