Tommy B
Posts: 0
Joined: Sat Sep 15, 2012 3:39 am

query between dates in the javascript option of the where statement

I want to query the back-end appery db for records that are equal to and in-between two dates. I will have a start date and an end date set. I tried this and versions similar in js of the "where" statement. No luck!

codereturn '{"date":"'>=dateStart && <=dateEnd'"}';/code

Tommy B
Posts: 0
Joined: Sat Sep 15, 2012 3:39 am

query between dates in the javascript option of the where statement

Thanks I will have to keep these in my shortcuts it is good info.

One other related question, when defining the "Where JS" does that have to be specifically bound to a component or can i reference a field codevar field = Appery ('field')&#46;val()/code

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

query between dates in the javascript option of the where statement

First of all you should use component name.
Appery.io JavaScript API: http://docs.appery.io/javascript-api/

Tommy B
Posts: 0
Joined: Sat Sep 15, 2012 3:39 am

query between dates in the javascript option of the where statement

Ok, so I can figure out how to do this.

I have multiple dates stored in a field in the appery db. The field is in string format. What i need to do is query between two dates that are stored in that field within the service that is created against the database.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

query between dates in the javascript option of the where statement

Hello! Field with data should have not string type, but date. This should help https://getsatisfaction.com/apperyio/...

Return to “Issues”