Parse(String,String,OracleDbType) Method
Converts the specified
System.String representation of a date to its
OracleTimeStamp equivalent using specified format and
OracleDbType.
Parameters
- value
- The System.String to be parsed.
- format
- A System.String that describes elements contained within .
- 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.
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)
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