次の方法で共有


formatDate Method

Formats the date using the specified formatting options.

strValue = oXTLRuntime.formatDate(varDate, bstrFormat, varDestLocale);

HRESULT formatDate(
  VARIANT varDate,
  BSTR bstrFormat,
  VARIANT varDestLocale,
  BSTR* pbstrFormattedString
);

General Remarks

The following table shows the supported date codes.

Date format Meaning
M Months as 1–12
MM Months as 01–12
MMM Months as Jan–Dec
MMMM Months as January–December
MMMMM Months as the first letter of the month
d Days as 1–31
dd Days as 01–31
ddd Days as Sun–Sat
dddd Days as Sunday–Saturday
yy Years as 00–99
yyyy Years as 1900–9999

This method applies to the following interface:

IXTLRuntime.

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.