Open spatil063 opened 7 years ago
did u solve your problem? If yes post solution, pls :)
no.Are r u having NY SOLUTION FOR THAT
On Mon, Mar 6, 2017 at 6:32 PM, luna-vulpo notifications@github.com wrote:
did u solve your problem? If yes post solution, pls :)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pardom/ActiveAndroid/issues/503#issuecomment-284389911, or mute the thread https://github.com/notifications/unsubscribe-auth/AV33yeaoJejsH_lADoAsZpIc4udwd5ISks5rjAPYgaJpZM4K2f0d .
You are doing it wrongly. Please refer the basic query. It should be like this:
String s = "start of month"; String d = "end of month";
Example 1 // date after start of month
.where("collectionDate > ?", s).execute()
Example 2 // select specific month only
.where("collectionDate BETWEEN ? AND ?", s, d).execute()
thx. But now we rid the ActiveAndroid from project.
name = "timestamp", index = true) private String timestamp; timestamp is format will be work!
Actually i am developing the app where i required to add the amount from start of the month till end of the month.
Below find my Query which i have tried
.where("date(datetime(collectionDate / 1000 , 'unixepoch')) BETWEEN date('now','start of month') and date('now','start of month','+one month','-one day')").execute(); ..where("date(datetime(collectionDate / 1000 , 'unixepoch')) BETWEEN date('start of month') and date('now')")
Both I have tried but nothing works
Belwo find Model
@Table(name = "Collection") public class CollectionModel extends Model {
}