DataFunctions.ConvertDateTimeString Method

The ConvertDateTimeString method converts the specified date/time value to a DateTime Variant, based on the specified locale. If successful, ConvertDateTimeString returns a DateTime Variant; otherwise, Null.

Syntax

DataFunctions.ConvertDateTimeString(DateTime, DateLocale, TimeLocale)

Parameters

DateTime
A string that specifies the date/time value to format.
DateLocale
Optional. This number specifies the locale to use to convert the date. For a list of valid locale values, see Hexadecimal Locale Identifiers. If this value is not specified, the value of the DataFunctions object’s Locale parameter is used.
TimeLocale
Optional. This number specifies the locale to use to convert the time. For a list of valid locale values, see Hexadecimal Locale Identifiers. If this parameter is not specified, the value of the DataFunctions object’s Locale parameter is used.
Warning

In some cases, the DataFunctions.ConvertDateTimeString method returns NULL when converting a string representation of the Date to the Date VARIANT type for Latvian and Bulgarian locales. To avoid this problem, remove the constant string added at the end of the Date Represantion String according to the Regional Settings.

Related Topics


© 1997-1998 Microsoft Corporation. All rights reserved.