map between C# DateTimeOffset &Oracle TIMESTAMP WITH TIMEZONE?
682444Jan 29 2009 — edited Jan 19 2012We 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! :)