I am exploring the features of OMNISCI to access parquet files via JDBC driver. I see an issue filtering DATE columns .
Casting a String to date or timestamp resulted in a previous day. Getting a date part of a date column resulted in next day. So it fails in where condition of a date field while retrieving data from a table.
select cast('2010-10-01' as DATE), cast ('2010-10-01' AS TIMESTAMP) ,delivery_date,datepart('Year',delivery_date) , datepart('month',delivery_date) , datepart('day',delivery_date) from xyz_table where point_type ='SH'
Your assistance is appreciated to understand this issue.
Thanks for your response.
The time in server and client are in sync. Regardless of a time zone conflicts , I am expecting the 'type cast' of a static date string parameter should return the same DATE value .
Here is the DDL .
CREATE TABLE xyz_table
Your suggestion of configuring the time zone to UTC works on a) converting string to Date b) Date Part function c) where clause on comparing a date field. Thanks a lot.