Information générale
Titre:
Change system date programatically
Versions des environnements
Dear Experts
To change system date programatically I use following method
lcCmd = GETENV("ComSpec") + [ /C ]
lcCmd = lcCmd + [ DATE 04-01-2005"
loShell = CREATEOBJECT("wscript.shell")
= loShell.Run(lcCmd,1,.t.)
This works fine but I want to change system date with date given in a textbox.
To do this there is a date type textbox containing value 04-10-1975
And there is a command button having following code
lcCmd = GETENV("ComSpec") + [ /C ]
DATE1=thisform.text2.Value
lcCmd = lcCmd + [ date ] + DATE1
loShell = CREATEOBJECT("wscript.shell")
= loShell.Run(lcCmd,1,.t.)
But it does not work and shows error message, Operator/Operant type mismatch.
Please help
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement