   Getting the current time as a string?
  I''m wondering if there is a way using a windows call to get the current time in form of a string? For example a call that would return, 2:34, assuming it was 2:34 on the users computer. 
  You can use GetSystemTime() to fill a SYSTEMTIME structure. wHour and wMinute will contain the hour and minute, which you can use to fill out a string. I don''t believe the Windows API has a function to create a formatted time string directly. Your programming language may have such a function however. ;  You can use this: time_t Seconds;struct tm* Date;Seconds = time(NULL);Date = localtime(&Seconds);cout<<"Date: "<<Date->tm_mday<<"/"<<Date->tm_mon+1;cout<<"/"<<Date->tm_year+1900<<endl;cout<<"Time: "<<Date->tm_hour<<":"<<Date->tm_min<<":";cout<<Date->tm_sec<<"\n\n";This is the tutorial on GameTutorials.com (http://www.gametutorials.com/CodeDump/CodeDump_Pg1.htm)(Date/Time)   /*I use DirectX 8.1 and C++ (Microsoft Visual C++ 6.0 Professional edition)*/ ;strftime --AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [Blog] [RSS] [Browse the source] [IRC channel] ;quote:Original post by Arild Fines  strftimeThank you!I''m surprised at how many people don''t know the Standard C Library (which, children, is also a part of the Standard C++ Library). strftime is located in <time.h> or <ctime>, for C and C++ respectively. ;  strftime?strftime?We''ll have none of that nonsense here!std::use_facet<std::time_put<char> >(std::locale()).put(), TYVM!Gawd, what a mouthful.