Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

current date / time

Status
Not open for further replies.

specv

Programmer
Aug 8, 2001
42
CA
Hi all,

I wrote a console application. I want to get the current date/time and write in a log file.

How can I get the current date/time ? What include I need?

Thanks,
Phil
 

_SYSTEMTIME t;
GetLocalTime( &t );
t.wSecond;
//get second... see wHour and wMinute

for windows.

ctime.h is ANSI, and I believe time( 0 ) returns the current time.

Hope that helps! :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top