FoxPro/Visual FoxPro - fecha

 
Vista:
sin imagen de perfil
Val: 2
Ha aumentado su posición en 48 puestos en FoxPro/Visual FoxPro (en relación al último mes)
Gráfica de FoxPro/Visual FoxPro

fecha

Publicado por Roman Osuna (170 intervenciones) el 17/11/2007 17:35:49
Hola, como puedo cambiar la fecha del sistema operativo desde mi programa?????
El sistema operativo ke uso es el xp.
De antemano muchas gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:fecha

Publicado por Plinio (7841 intervenciones) el 18/11/2007 00:34:05
Cual es el objectivo?, porque es facil cambiarla desde windows.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:fecha

Publicado por Ernesto Hernandez (4623 intervenciones) el 19/11/2007 06:37:02
* Begin code to read system short date format *
*
* Setup declaration and parameters
Declare INTEGER GetLocaleInfo in Win32API LONG Locale, ;
LONG LCType, STRING @LpLCData, INTEGER cchData

* GetSystemDefaultLCID retrieves the system default locale identifier
Declare LONG GetSystemDefaultLCID in Win32API
Declare SetLocaleInfo in Win32API LONG Locale, LONG LCType, ;
STRING @LpLCData
dwLCID = GetSystemDefaultLCID()
Locale = 2048 && For English language.
LpLCData = space(255) && Address of buffer information.
cchData = LEN(LpLCData) && Size of buffer, LpLCData.
nretval = 0 && Number returned from API call.
cShortdate= "" && Hold original short date format.

* Get version, VFP 5 uses Hexadecimal & decimal, VFP 3 only uses decimal
IF "3.00"$VERSION()
LCType = 31 && Type of information. Decimal 31 for short date.
ELSE
LCType = 0x1f && Type of information. Hex 1f for short date.
ENDIF

* Obtain short date format
nretval = GetLocaleInfo(Locale, LCType, @LpLCData, cchData)
If nretval = 0 Then
=MessageBox ("Could not get information.")
Else
=MessageBox (LpLCData, 32, "Short Date Format")
cShortdate = LpLCData && Store original date format.
EndIf

* Variable for new short date format
cNewshortdate = "MM/dd/yy" && Short date style copied from
&& Control Panel.
setdate = SetLocaleInfo(dwLCID, LCType, cNewshortdate)
* Reread the system short date to see change
nretval = GetLocaleInfo(Locale, LCType, @LpLCData, cchData)
=MessageBox (LpLCData, 32, "Updated short Date Format")
* Now reset date to previous format
cNewshortdate = cShortdate
setdate = SetLocaleInfo(dwLCID, LCType, cNewshortdate)
* Verify date is in original format
nretval = GetLocaleInfo(Locale, LCType, @LpLCData, cchData)
=MessageBox (LpLCData, 32, "")

* End of code

=MessageBox (LpLCData, 32, "")
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:fecha

Publicado por Plinio (7841 intervenciones) el 19/11/2007 11:55:31
Estas seguro que eso hace lo que el quiere?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:fecha

Publicado por Plinio (7841 intervenciones) el 20/11/2007 23:58:23
Tampoco, solo cambia el orden de meses y dias.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar