Export (0) Print
Expand All

EnumDateFormats (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function enumerates the long or short date formats that are available for a specified locale, including date formats for any alternate calendars.

BOOL EnumDateFormats(
  DATEFMT_ENUMPROC lpDateFmtEnumProc, 
  LCID Locale, 
  DWORD dwFlags
); 

Parameters

lpDateFmtEnumProc
[in] Pointer to an application-defined callback function. The EnumDateFormats function enumerates date formats by making repeated calls to this callback function. For more information, see the EnumDateFormatsProc callback function.
Locale
[in] Value that specifies the locale to retrieve date format information for. This parameter can be a locale identifier created by the MAKELCID macro, or one of the following predefined values. The following table shows the values this parameter can take.
ValueDescription
LOCALE_SYSTEM_DEFAULTDefault system locale.
LOCALE_USER_DEFAULTDefault user locale.
LOCALE_NEUTRALDefault language-neutral locale.
dwFlags
[in] Value that specifies the date formats that are of interest. The following table shows the values this parameter can take.
ValueDescription
DATE_SHORTDATEReturn short date formats.
DATE_LONGDATEReturn long date formats.

Return Values

Nonzero indicates success. Zero indicates failure. To get extended error information, call the GetLastError function. The following table shows possible return values for the GetLastError function.

ValueDescription
ERROR_BADDBThe configuration registry database is corrupt.
ERROR_INVALID FLAGSThe flags are invalid.
ERROR_INVALID_PARAMETERThe parameter is incorrect.

Remarks

For more information about LCID, see National Language support (NLS) Locale Identifiers.

The DATE_SHORTDATE and DATE_LONGDATE flags are mutually exclusive. Use one or the other, but not both.

For Microsoft Windows CE 2.10 and later, default DATE_SHORTDATE formats for non-U.S. English locales that include the four-digit year are added. The following table shows the formats.

LocaleDate Format
United Kingdomdd/MM/yyyy
Canadadd/MM/yyyy
New Zealanddd/MM/yyyy
Irelanddd/MM/yyyy
South Africadd/MM/yyyy
CaribbeanMM/dd/yyyy
Belizedd/MM/yyyy
Trinidaddd/MM/yyyy

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Winnls.h.
Link Library: Coreloc.lib.

See Also

National Language support (NLS) Locale Identifiers | EnumCalendarInfo | EnumDateFormatsProc | EnumTimeFormats | MAKELCID


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft