Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

map between C# DateTimeOffset &Oracle TIMESTAMP WITH TIMEZONE?

682444Jan 29 2009 — edited Jan 19 2012
We have a Oracle column with type TIMESTAMP with TIMEZONE. We're using ODP.Net v2.102.2.20. We need to know how to insert and retrieve a C# DateTimeOffset into this column.

We tried using System.Data.DbType.DateTimeOffset (this did not work). Also we note that in the ODP.Net documentation suggests using DateTime:

ODP.NET Types Overview
-------------------------------------
Oracle Native Datatype or PL/SQL Datatype ODP.NET Type .NET Framework Datatypes
TIMESTAMP WITH TIME ZONE OracleTimeStampTZ structure System.DateTime

This is insufficient, because C# DateTime wont maintain timezone information (this is what DateTimeOffset does). We need a mapping between C# DateTimeOffset and Oracle TIMESTAMP WITH TIMEZONE. How do we do this? Thanks! :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 16 2012
Added on Jan 29 2009
1 comment
6,197 views