Hi,

I´m having a problem with some dates using external tables to a text file.
Let me give you an example:

file content:

*1946-10-01*
1946-10-02


table:

create external table date_issue_test
(

date_test     Date

)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\001'
LINES TERMINATED BY '\n'
STORED AS TEXTFILE
LOCATION '/user/hive/test';


Select * from date_issue_test;

OK
*1946-10-02*
1946-10-02


As you can see in this case it adds a day, there are a few cases like this.

Also I tried with a CAST and a fixed date as bellow :

hive> select CAST('1946-10-01' as date) from date_issue_test limit 1;
OK
1946-10-02


Any idea to help me?

Thank you so much!

*Julian*

Reply via email to