Borland C++ reference

_strtime

raw OCR

Converts current time to string.

Defined in header <time.h>

Syntax

#include <time.h>
char *_strtime(char *buf);

Portability

DOSUNIXWindowsANSI CC++ only
■■

Remarks

_strtime converts the current time to a string, storing the string in the buffer buf. The buffer must be at least 9 characters long.

The string has the following form: HH:MM:SS where HH, MM, and SS are all two-digit numbers representing the hour, minute, and second, respectively. The string is terminated by a null character.

Return value

_strtime returns buf, the address of the time string.

See also

Example

#include <time.h>
#include <stdio.h>
void main(void)
{
    char datebuf [9], timebuf[9];

    _strdate(datebuf ) ;
    _strtiine(timebuf) ;
    printf ("Date: %s  Time: %s\n",datebuf ,timebuf);

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.

Extraction notes

  • heading `strtime` read as `_strtime`