Udostępnij za pośrednictwem


CTime::FormatGmt

Generates a formatted string that corresponds to this CTime object.

CString FormatGmt(
   LPCTSTR pszFormat 
) const;
CString FormatGmt(
   UINT nFormatID 
) const;

Parameters

  • pszFormat
    Specifies a formatting string similar to the printf formatting string. See the run-time function strftime for details.

  • nFormatID
    The ID of the string that identifies this format.

Return Value

A CString that contains the formatted time.

Remarks

The time value is not converted and thus reflects UTC.

This method throws an exception if the date-time value to format does not range from midnight, January 1, 1970 through December 31, 3000 Universal Coordinated Time (UTC).

Example

See the example for CTime::Format.

Requirements

Header: atltime.h

See Also

Reference

CTime Class

Hierarchy Chart

CTime::Format

Other Resources

CTime Members