Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get the short and long date format string
Message
De
21/06/2007 11:40:37
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01234713
Message ID:
01234744
Vues:
13
This message has been marked as the solution to the initial question of the thread.
Hi,

try this one ...
#DEFINE LOCALE_SSHORTDATE	0x1F
#DEFINE LOCALE_SLONGDATE	0x20
#DEFINE LOCALE_USER_DEFAULT	0x400

DECLARE INTEGER GetLocaleInfo IN kernel32.dll INTEGER nLocale, INTEGER nType, STRING @ pBuffer, INTEGER nBufferSize

?GetLocaleInfoEx(LOCALE_SSHORTDATE)
?GetLocaleInfoEx(LOCALE_SLONGDATE)

FUNCTION GetLocaleInfoEx(nType)
	LOCAL lcInfo, lnRet
	lcInfo = SPACE(256)
	lnRet = GetLocaleInfo(LOCALE_USER_DEFAULT, nType, @lcInfo, 256)
	IF lnRet > 0
		RETURN LEFT(lcInfo,lnRet-1)
	ELSE
		RETURN '' && Error - call GetLastError, FormatMessage API's for error information
	ENDIF
ENDFUNC
Regards
Christian
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform