Convert svalue that is a string representation of value of type vtype into the neutral format. It is assumed that svalue has a format that is a valid format for the session locale.

Namespace:  Aras.IOM
Assembly:  IOM (in IOM.dll) Version: 11.0.0.6296

Syntax

C#
public string ConvertToNeutral(
	string svalue,
	string vtype,
	string datePtrn
)
Visual Basic (Declaration)
Public Function ConvertToNeutral ( _
	svalue As String, _
	vtype As String, _
	datePtrn As String _
) As String
J#
public String ConvertToNeutral(
	String svalue,
	String vtype,
	String datePtrn
)
JScript
public function ConvertToNeutral(
	svalue : String, 
	vtype : String, 
	datePtrn : String
) : String

Parameters

svalue
Type: System..::.String
Locale specific string representation of a value that has to be converted.
vtype
Type: System..::.String
Type of the value; only the following types are considered to be locale specific - 'date' | 'float' | 'decimal'
datePtrn
Type: System..::.String
The parameter is taken into consideration only if vtype='date'. In this case user can specify the exact format that is used in the string representation of a date in svalue. In case vtype='date' but the parameter is not specified or passed as null or empty string then an attempt is made to parse the svalue assuming that it has a valid format for the session locale.

Return Value

Remarks

Note that in case vtype='date' and svalue contails time zone offset (e.g. "2008-10-22T16:20:00-0500") the svalue represents a concrete moment of time which is different from the case when svalue doesn't have an offset (e.g. "2008-10-22T16:20:00") because "no offset" value can be interpreted as different moments of time depending of the time zone in which the value is processed. If svalue doesn't have an offset it's interpreted as the date-time in the time zone of the session. If svalue has an offset (i.e. it represents a concrete moment of time) it's represented as the same moment of time in the time zone of the session. For instance, if time zone of the session is "Eastern Standard Time" and svalue is "2008-12-25T18:25:00+0100" then the methods returns "2008-12-25T12:25:00".

Exceptions

ExceptionCondition
System..::.FormatExceptionsvalue does not contain a valid string representation of the type defined by the vtype

See Also