DataFunctions.ConvertTimeString Method (PIA)
Use this method to convert a time string to a date object, based on the default or specified locale.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop
…
Public Function ConvertTimeString(vtDate As Object,
Optional vtLocale As Object) As Object
[C#]
using Microsoft.CommerceServer.Interop;
…
public object ConvertTimeString(objectvtDate,
objectvtLocale);
Parameters
[Visual Basic .NET]
- vtDate
An Object that specifies a string representation of the time to convert. - vtLocale
An Object that specifies the locale to use to convert the string. If this parameter is not specified, the value of the Locale property of the DataFunctions object is used.
[C#]
- vtDate
An object that specifies a string representation of the time to convert. - vtLocale
An object that specifies the locale to use to convert the string. If you want the value of the Locale property of the DataFunctions object to be used, pass Type.Missing for this parameter.
Return Values
[Visual Basic .NET] If this method completes successfully, it returns a date Object that contains the time; otherwise, Null is returned. Additionally, if the string representation contains a date, ConvertTimeString returns Null.
[C#] This method returns an object containing the converted time value.
Exceptions
This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.
Example
[Visual Basic .NET]
Dim Result As Object
Dim Amount As Object
' vtTimeString is a string representation of a time value
DataFunctions df = New DataFunctions()
' Set to USA
df.Locale = 1033
Result = df.ConvertTimeString(vtTimeString)
Response.Write("USA: " & Result & "<P>")
[C#]
No example available.
Requirements
Namespace: Microsoft.CommerceServer.Interop
Platforms: Windows 2000, Windows Server 2003
Assembly: mscsasphelplib (in mscsasphelplib.dll)
See Also
DataFunctions.ValidateDateTime
Copyright © 2005 Microsoft Corporation.
All rights reserved.