SQL lite select for actual week (from monday till sunday)
I'm trying to select values for actual week from monday to sunday in SQLlite. I'm trying to do by this way: SELECT * FROM planned_calls WHERE DATE(date) >= DATE('now', 'weekday 0', '-7 days'); But it return also result from past (for example today is monday but in returned result are results from last sunday too). How can I do it right please? Thanks for any advice.
date('now', 'weekday 0') is the next Sunday. Subtracting seven days goes to the previous Sunday. If you want to start at Monday, you have to subtract six days.
Try this : SELECT * FROM planned_calls WHERE DATE(date) > DATE('now', 'weekday 0', '-7 days');
SQLite row IDs do not match the ListView row IDs
Build failed with an exception in React Native android
Return to default OnClickListener Navigation Drawer Icon
Android Changing Toolbar Based on Navigation View Selection
How to update the webview contents?
Incoming call manage from android app
Square okHTTP certificate pinning - sslSocketFactory error
How can I make a dialog ? How can I fix this? [closed]
Sending opt in links using email to start Apps not working
how to delete row with where clause?
Published app with a typo in the package name
OnErrorNotImplementedException Caused by: rx.exceptions.MissingBackpressureException
how can i create directory using DocumentsContract.CreateDocument on android kitkat?
Android GridView scrolling with ImageButtons
ShadowIntent is null - Robolectric 3.0
allow access to devices not asked, in one plus 2 phone, when downloading app from google store