Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>_strtime() copy system time to string</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _strtime()              Copy System Time to String

 #include   <time.h>

  char *_strtime(time);
  char *time;  Current time

    _strtime() copies the current system time to the buffer that time
    points to. The string is formatted hh/mm/ss, where hh is two digits
    representing the hour in 24-hour format (00 - 23),  mm is two digits
    representing minutes past the hour (00 - 59), and ss is two digits
    representing seconds (00 - 59).

    Returns:    System time in buffer pointed to by time. There is no
                error return.

      Notes:    The buffer time must be at least nine bytes long.

   Portability:     MS-DOS only

 -------------------------------- Example ---------------------------------

 This program prints the current system time

           #include <time.h>

           main()
           {
              char time[9];

              _strtime(time);
              printf("The current system time is %s\n", time);
           }


See Also: _strdate() asctime() ctime() gmtime() localtime() time()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson