PC Review


Reply
Thread Tools Rate Thread

how can I change the system current date (time) using c#?

 
 
George LAZAR
Guest
Posts: n/a
 
      3rd Sep 2004
how can I change the system current date (time) using c#?

thank you
George


 
Reply With Quote
 
 
 
 
Striped
Guest
Posts: n/a
 
      3rd Sep 2004
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 + "\"");


"George LAZAR" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> how can I change the system current date (time) using c#?
>
> thank you
> George
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
system date and time change to shutdown time =?Utf-8?B?TXViYXNoZXI=?= Windows XP Help 1 14th Feb 2005 04:02 PM
how can I change the system current date (time) using c#? George LAZAR Microsoft Dot NET Framework 1 3rd Sep 2004 04:15 PM
How to change system date/time =?Utf-8?B?QWxiZXJ0?= Microsoft Dot NET Compact Framework 1 14th Aug 2004 12:01 PM
Change system date and time Konrad Microsoft Dot NET Framework Forms 1 19th Dec 2003 01:41 AM
Change System Date/Time Mike C Microsoft Access Form Coding 1 6th Nov 2003 06:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:17 PM.