Connecting Tech Pros Worldwide Help | Site Map

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

Kueishiong Tu
Guest
 
Posts: n/a
#1: Nov 17 '05
How do I get system time in VC++ in the .net development environment?
Peter van der Goes
Guest
 
Posts: n/a
#2: Nov 17 '05

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



"Kueishiong Tu" <Kueishiong Tu@discussions.microsoft.com> wrote in message
news:ED879D56-E9B5-4312-9548-928E122C04C4@microsoft.com...[color=blue]
> How do I get system time in VC++ in the .net development environment?[/color]

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 [MVP Visual Developer]
Jack of all trades, master of none.


Vinayak Raghuvamshi
Guest
 
Posts: n/a
#3: Nov 17 '05

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


"Peter van der Goes" <p_vandergoes@toadstool.u> wrote in message news:<efFz4LGWEHA.2408@tk2msftngp13.phx.gbl>...[color=blue]
> "Kueishiong Tu" <Kueishiong Tu@discussions.microsoft.com> wrote in message
> news:ED879D56-E9B5-4312-9548-928E122C04C4@microsoft.com...[color=green]
> > How do I get system time in VC++ in the .net development environment?[/color]
>
> 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...[/color]

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