Unable to use lastmodifieddate in the WHERE clause in netsuite2.com SQL query

I am trying to run a query against netsuite2.com as following:

select lastmodifieddate from transaction where lastmodifieddate>'2016-06-16 18:50:50'

But this produces an error:

[NetSuite][SuiteAnalytics Connect JDBC Driver][OpenAccess SDK SQL Engine]Failed to retrieve data. Error ticket# kybpw8j91333lgz1ovora[400]

p.s. I am using NQjc.jar JDBC driver.


This problem has to do with the datetime settings on the account being used to connect to the analytics schema. To make sure it works for all cases, use the to_date function to convert the string representation into a sql datetime object:

select lastmodifieddate from transaction 
where lastmodifieddate > to_date('2016-06-16 18:50:50', 'yyyy-mm-dd hh:mi:ss')