Hi,
I would like to translate below N1QL query into java code using couch base select statements
select * from Table_Name where STR_TO_MILLIS(DateTime_ColomnName) <= DATE_ADD_MILLIS(NOW_MILLIS(), -2, ‘hour’)
I would really appreciated if somebody can guid me.
Thanks in advance!
vsr1
2
I am able to translate into Java code. Here is the solution
Statement query=Select.select("*").from(i(“Table_Name”)).where(x("ColumnName ").eq(s(ColumnName))
.and(x("ColumnName ").eq(s(“ColumnName”))) .and(strToMillis(“DateTImeColumnName”).lte(dateAddMillis(nowMillis(),-200,DatePart.hour))))