Help Center

COleDateTime.Formatmethod

Converts a **COleDateTime** object to a string.

DateTimemethodCOleDateTime.incdocumented

Syntax

FUNCTION Format (BYREF wszFmt AS WSTRING) AS DWSTRING

Parameters

NameDescription
wszFmtA format string which contains special formatting codes that are preceded by a percent sign (%).

Description

Converts a COleDateTime to a formatted string.

Formatting codes:

The # flag may prefix any formatting code. In that case, the meaning of the format code is changed as follows.

  • %#a, %#A, %#b, %#B, %#p, %#X, %#z, %#Z, %#%: # flag is ignored.
  • %#c: Long date and time representation, appropriate for current locale. For example: "Tuesday, March 14, 1995, 12:41:29".
  • %#x* Long date representation, appropriate to current locale. For example: "Tuesday, March 14, 1995".
  • %#d, %#H, %#I, %#j, %#m, %#M, %#S, %#U, %#w, %#W, %#y, %#Y: Remove leading zeros (if any).

Reference

  • Include file COleDateTime.inc
  • Defined in AfxNova/COleDateTime.inc:818
  • Documented in DateTime/COleDateTime Class.md
  • Topic: COleDateTime Class