Jul 8, 2003 #1 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
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
Jul 8, 2003 #2 BoulderBum Programmer Jul 11, 2002 2,179 US _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! Upvote 0 Downvote
_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!