G George LAZAR Sep 3, 2004 #1 how can I change the system current date (time) using c#? thank you George
S Striped Sep 3, 2004 #2 I'm not sure about C#, but you can use WIN API call: SYSTEMTIME st; SetSystemTime(&st)) or directly invoke a DOS command (sorry Java string newDate = "01-06-04"; string newTime = "8:30"; Runtime.getRuntime().exec("CMD /c \"DATE " + newDate + "\""); Runtime.getRuntime().exec("CMD /c \"TIME " + newTime + "\"");
I'm not sure about C#, but you can use WIN API call: SYSTEMTIME st; SetSystemTime(&st)) or directly invoke a DOS command (sorry Java string newDate = "01-06-04"; string newTime = "8:30"; Runtime.getRuntime().exec("CMD /c \"DATE " + newDate + "\""); Runtime.getRuntime().exec("CMD /c \"TIME " + newTime + "\"");