DataFunctions Object
Use this object to perform locale-based formatting, parsing, and value range checking in a site. This object also has a variety of utilities useful for site development.
ProgID: | Commerce.DataFunctions (Externally creatable) |
COM Class Name: | DataFunctions_4_0 |
COM Interface Name: | IDataFunctions_4_0 |
Interface ID Constant: | IID_IDataFunctions_4_0 |
Header File: | commerce.h, mspu_guids.h |
Type Library Name: | Commerce -- MSCSAspHelp Type Library |
DLL Name: | MSCSAspHelp.dll |
Threading Model: | Both |
In C++, use the IDataFunctions_4_0 and IDataFunctions_3_0 interfaces to access the properties and methods of the DataFunctions object.
The properties of the DataFunctions object are shown in the following table.
Property | Type | Description |
Locale | Long | Stores a number that represents the default locale to be used to format date, time, money, and number values.
This property is read/write. |
CurrencySymbol | VARIANT | Stores the currency symbol to use if no currency symbol is specified in the ConvertStringToCurrency and LocalizeCurrency methods. The default value is the system default currency symbol.
This property is read/write. |
The methods of the DataFunctions object are shown in the following table.
Method | Description |
CleanString | Processes the specified string. This processing can include stripping out white spaces, modifying the case of the string, and validating that the length of the string falls within a specified range. |
ConvertDateString | Converts the specified string representation of the date to a date VARIANT, based on the default or specified locale. |
ConvertDateTimeString | Converts the specified string representation of the date and time to a date VARIANT, based on the default or specified locale. |
ConvertFloatString | Converts the specified string representation of a floating-point number to a double VARIANT, based on the default or specified locale. |
ConvertMoneyStringToNumber | Converts the specified string representation of a currency value to a long VARIANT, based on the default or specified locale. |
ConvertNumberString | Converts the specified string representation of a number to an integer VARIANT, based on the default or specified locale. |
ConvertTimeString | Converts the specified string representation of a time value to a date VARIANT, based on the default or specified locale. |
Date | Returns a string representation of a date stored in a date VARIANT, based on the default or specified locale. |
DateTime | Returns a string representation of a date and time stored in a date VARIANT, based on the default or specified locale. |
Float | Returns a string representation of a floating-point number, based on the default or specified locale. |
GetLocaleInfo | Retrieves information about the specified locale. |
GetLocaleList | Retrieves a list of installed locales. |
Money | Returns a formatted currency string, based on the default or specified locale. |
Number | Returns a string representation of a number, based on the default or specified locale. |
Time | Returns a string representation of a time stored in a date VARIANT, based on the default or specified locale. |
ValidateDateTime | Checks whether the specified string contains a valid date and/or time, and optionally checks against a specified range. |
ValidateFloat | Checks whether the specified string contains a valid floating-point number, and optionally checks the value of the number against a specified range. |
ValidateNumber | Checks whether the specified string contains a valid number, and optionally checks the value of the number against a specified range. |
CloneObject | Clones a SimpleList or Dictionary object. |
ConvertStringToCurrency | Converts the specified string representation of currency value into a currency VARIANT. |
LocalizeCurrency | Creates a string representation of a currency value formatted to a specified locale and currency symbol. |