Jul 8, 2003 #1 specv Programmer Joined Aug 8, 2001 Messages 42 Location 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 Joined Jul 11, 2002 Messages 2,179 Location 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!