Five Stars

Date format is changing while extraction from Oracle

Hi,

 

I've extracting data from oracle and storing into csv file.

There is one date column field where date comes in this format "01-12-2017 21:51:42"

 

But what happens some time while extraction data in csv files date comes like this "2017-12-01 21:51:42", so my further process gets failed. But when I do extraction again it comes fine with this format "01-12-2017 21:51:42".

 

Mat I know please what could be reason for this fluctuation ? I always check the DB when I get wrong date format in csv but in DB it always shows the correct only "01-12-2017 21:51:42".

 

Any Suggestions..!

5 REPLIES
Thirteen Stars TRF
Thirteen Stars

Re: Date format is changing while extraction from Oracle

Hi,

Looks strange!

I suggest you to include a date format for those queries such as:

TO_CHAR(yourDateColumn, 'DD-MMYYYY HH24:MI:SS')

This will ensure the output format.


TRF
Eleven Stars

Re: Date format is changing while extraction from Oracle

After extraction are you openning  csv file ? to avoid this kind of issue please open in Notepad++.

Manohar B
Five Stars

Re: Date format is changing while extraction from Oracle

Hi @TRF

 

I can't use your logic because am using dynamic schema. I'm loading multiple tables one by one and in every table date column name is different.

 

I'm using multi-threading, Do you think so it could be the issue...?

Five Stars

Re: Date format is changing while extraction from Oracle

@manodwhb, I always follow this to check exact date format. But I can see the change in date pattern sometimes.
Eleven Stars

Re: Date format is changing while extraction from Oracle

Can you post your job design here?

Manohar B