How do I get system time in VC++ in the .net development environme

  • Thread starter Thread starter Guest
  • Start date Start date
Kueishiong Tu said:
How do I get system time in VC++ in the .net development environment?

What kind of project?
If you're doing a Windows application, you can use GetSystemTime() and
SetSystemTime() with a SYSTEMTIME structure. For more on these, plug the
phrase "system time" into the help, filtered by Visual C++.
More generally, VC++ 7.1 still supports time.h and ctime.h (time constants),
which can be used to get the system time.
I'm sure others will offer additional suggestions...
 
Peter van der Goes said:
What kind of project?
If you're doing a Windows application, you can use GetSystemTime() and
SetSystemTime() with a SYSTEMTIME structure. For more on these, plug the
phrase "system time" into the help, filtered by Visual C++.
More generally, VC++ 7.1 still supports time.h and ctime.h (time constants),
which can be used to get the system time.
I'm sure others will offer additional suggestions...

in VC++ .net, you can do it this way too.
Console::WriteLine(System::DateTime::get_UtcNow().ToString());
 
Back
Top