phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject strange behavior with DATE columns
Date Thu, 07 Jan 2016 19:53:23 GMT

I am having a DATE column in Phoenix DB. Through SQuirreL SQL client or JDBC, when I do an
upsert date as string, the resultant date is always one day less. For ex all the below statements
(with any date format in TO_DATE function) yield the same result (i.e., instead of 15th it's
14th of July):

COLUMN             TYPE
=======             ====
COL1                      VARCHAR
COL3                      DATE

UPSERT INTO TEST VALUES ('5', TO_DATE('2016-07-15', 'yyyy-MM-dd'))
UPSERT INTO TEST VALUES ('5', '07/15/2016')


5              2016-07-14

If I use JDBC PreparedStatement.setDate(...), it works as expected.

Any ideas?



This message is for information purposes only, it is not a recommendation, advice, offer or
solicitation to buy or sell a product or service nor an official confirmation of any transaction.
It is directed at persons who are professionals and is not intended for retail customer use.
Intended for recipient only. This message is subject to the terms at:

For important disclosures, please see: regarding
market commentary from Barclays Sales and/or Trading, who are active market participants;
and in respect of Barclays Research, including disclosures relating to specific issuers, please


View raw message