dotConnect for Oracle Documentation
Devart.Data.Oracle Namespace / OracleTimeStamp Structure / Parse Method / Parse(String,String,OracleDbType) Method
The System.String to be parsed.
A System.String that describes elements contained within value.
A OracleDbType value. Only OracleDbType.TimeStamp, OracleDbType.TimeStampLTZ, and OracleDbType.TimeStampTZ are allowed.
Example

In This Topic
    Parse(String,String,OracleDbType) Method
    In This Topic
    Converts the specified System.String representation of a date to its OracleTimeStamp equivalent using specified format and OracleDbType.
    Syntax
    'Declaration
     
    Public Overloads Shared Function Parse( _
       ByVal value As String, _
       ByVal format As String, _
       ByVal timeStampType As OracleDbType _
    ) As OracleTimeStamp
    public static OracleTimeStamp Parse( 
       string value,
       string format,
       OracleDbType timeStampType
    )

    Parameters

    value
    The System.String to be parsed.
    format
    A System.String that describes elements contained within value.
    timeStampType
    A OracleDbType value. Only OracleDbType.TimeStamp, OracleDbType.TimeStampLTZ, and OracleDbType.TimeStampTZ are allowed.

    Return Value

    An OracleTimeStamp structure equal to the date represented by the specified System.String.
    Example
    The following example demonstrates how to parse a string using your own format with and without a time zone.
    OracleTimeStamp newts = OracleTimeStamp.Parse("10/03/05 3:04 PM", "mm/dd/yyyy HH:MI AM", OracleDbType.TimeStampLTZ);
    OracleTimeStamp newts2 = OracleTimeStamp.Parse("10/03/05 3:04 +03:00 PM", "mm/dd/yyyy HH:MI TZH:TZM AM", OracleDbType.TimeStampTZ);
    Dim newts As OracleTimeStamp = OracleTimeStamp.Parse("10/03/05 3:04 PM", "mm/dd/yyyy HH:MI AM", OracleDbType.TimeStampLTZ)
    Dim newts2 As OracleTimeStamp = OracleTimeStamp.Parse("10/03/05 3:04 +03:00 PM", "mm/dd/yyyy HH:MI TZH:TZM AM", OracleDbType.TimeStampTZ)
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also