Export (0) Print
Expand All

<iomanip> put_time

Writes a time value from a time structure to a stream by using a specified format.

template<class Elem>
    T10 put_time(
        struct tm *_Tptr, 
        const Elem *_Fmt


The time value to write to the stream, provided in a time structure.


The desired format to write the time value.

Returns the stream str.

The manipulator returns an object that, when inserted into the stream str, behaves as a formatted output function. The output function calls the member function put for the locale facet time_put associated with str. The output function uses _Tptr to indicate the time structure and _Fmt to indicate the beginning of a NUL-terminated format string. If successful, the call inserts literal text from the format string and converted values from the time structure. The manipulator then returns str.

Header: <iomanip>

Namespace: std

© 2014 Microsoft