Help! DateTime question.

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

This may sound a bit weird, but I cannot find any class
in the framework that lets me change the current date and
time on the PC.

I know I can import the Win32 API functions, but I'd like
to do it in a "pure" .NET fashion.

Is there any class that let's me change the system
date/time?!
..
 
Frank said:
This may sound a bit weird, but I cannot find any class
in the framework that lets me change the current date and
time on the PC.

I know I can import the Win32 API functions, but I'd like
to do it in a "pure" .NET fashion.

Is there any class that let's me change the system
date/time?!

No, I don't believe there is - you need to use P/Invoke, I think.
 
Frank said:
This may sound a bit weird, but I cannot find any class
in the framework that lets me change the current date and
time on the PC.

I know I can import the Win32 API functions, but I'd like
to do it in a "pure" .NET fashion.

Is there any class that let's me change the system
date/time?!
.

In VB.Net, you can use

Microsoft.VisualBasic.DateAndTime.Today = <DateValueHere>


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Back
Top