Hi i want to passe datetime value into querybuilder but it gives me an error heres the methode:
public Collection<TimeLine> getDataTime(long deviceId, DateTime firstDate,DateTime lastDate) throws SQLException {
return QueryBuilder.create(dataSource, getQuery("database.selectMapDataOfSelected"))
.setLong("deviceId", deviceId)
.setDateTime("firstDate", firstDate)
.setDateTime("lastDate", lastDate)
.executeQuery(TimeLineItemSelectedSTG.class);
}
setDateTime doesnt exist in the query builder how cna resolve this problem??
You need to call "setDate". Please study the code before asking questions like this.
you didnt understant what i wanted to say..i meant quryBuider dosnt support setDatetime...(in case we want to passe a datetime value..) anyway i solve the problem..thanks
No, I think you don't understand something. There is no DateTime type is Java. Date object contains both date and time.
Hi i want to passe datetime value into querybuilder but it gives me an error heres the methode:
setDateTime doesnt exist in the query builder how cna resolve this problem??