Hi,
We are using Oracle type Timestamp with Zone in our database. Using UniDirectCommand and UniDirectDataAdapter we fill a dataset with columns for this type set as DateTime, Kind.LocalUnspecified. Unfortunately, the query returns the time exactly like in the database and drops the timezone (the application is windows based with class libraries). As a result dataset just decides that time zone is local which is actually wrong.
I tried to change data type Kind to UTC, it didn't change anything.
Then I tried to switch to DateTimeOffset and got casting types error.
So what is the best way to handle TimeStamp With Zone datatype with UniDirect controls?
Thank you,
Galina
Problems with Timestamp with Zone Oracle type
Re: Problems with Timestamp with Zone Oracle type
I found the way around the first problem, but now I need to save dates using UniDirect components. After saving I should get something like: 01-OCT-13 09.00.00.000000000 PM UTC
I tried:
1. Set up parameters as Date or DateTime, then my date was saved as 01-OCT-13 09.00.00.000000000 PM -06:00
2. Set up parameters as TimeStampTZ, then my date was saved as 01-OCT-13 09.00.00.000000000 PM +00:00. This is better, but is there a way to save format as required?
Thank you,
Galina
I tried:
1. Set up parameters as Date or DateTime, then my date was saved as 01-OCT-13 09.00.00.000000000 PM -06:00
2. Set up parameters as TimeStampTZ, then my date was saved as 01-OCT-13 09.00.00.000000000 PM +00:00. This is better, but is there a way to save format as required?
Thank you,
Galina
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Problems with Timestamp with Zone Oracle type
This is designed behaviour. You need to use a workaround to get the result you want.gala_l wrote:1. Set up parameters as Date or DateTime, then my date was saved as 01-OCT-13 09.00.00.000000000 PM -06:00
This is the best known workaround.gala_l wrote:2. Set up parameters as TimeStampTZ, then my date was saved as 01-OCT-13 09.00.00.000000000 PM +00:00. This is better, but is there a way to save format as required?