android


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');

Related Links

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

Categories

HOME
asp.net-web-api
assembly
linkedin
gpu
apiblueprint
seo
database-normalization
nested-if
ado.net
jquery-ui
arangodb
drop-down-menu
mel
mod-security
automatic-ref-counting
supervisor
qsqlquery
azure-iot-hub
video-editing
delphi-xe5
gmm
babel
pimcore
zxing
short-url
dynamically-generated
beta
shared
nstimer
intersystems-cache
wcag
winpe
anki
glib
code-snippets
card.io
getpixel
imx6
projects-and-solutions
p4merge
unordered-map
apriori
dbnull
congestion-control
avcapturedevice
photos
x++
jquery-ui-draggable
remedy
pocketsphinx-android
chromium-os
simplepie
vulcanize
android-dateutils
pre-build-event
mediametadataretriever
angular-ui-typeahead
fuzzywuzzy
decimalformat
lazybones
rate-limiting
sony-lifelog-api
cwrsync
kubuntu
theos
sonarqube-5.0
structuremap3
post-commit-hook
formview
nsmenu
raygun
ignite-ui
file-not-found
eclipse-kepler
scmmanager
http-status-code-410
midlet
thttpd
fusefabric
urlrewriter
agility.js
workflow-services
mysql-error-1205
rmdir
multiplatform
appledoc
object-database
fail-fast-fail-early
perl5.12

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App