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

SlidingMenu shows blsck when used with Map api v2
Cannot find method using android:onclick
How to set a TextView at the bottom of the screen
Alarm Does Not Wake up my Service
trying to run emulator on eclipse
Android development, retrieving values from a string array
How are .java files in android_stubs_current_intermediates directory generated?
InputStream.Read(byte) returning ioexception : operation canceled
Error on stream media on android
SVG not displaying properly on Android 4.x native browser
SharedPreferences not storing correctly
Refreshing ArrayAdapter onResume [notifyDataSetChanged() not working]
Customizing youtube player view in android
Android Expansion apk
Custom adapter list view is not getting refreshed
post publish updated version of application in android market [closed]

Categories

HOME
eslint
redux-form
angular-formly
grafana
appcelerator
yandex
tivoli
maxscript
qpython
spin
commonjs
windows-ce
project-intu
selenium-ide
http-post
coin3d
symfony-2.8
google-picker
sigma.js
springfox
hta
moses
progress-bar
angular-translate
rpgle
subclass
autodesk-designautomation
left-join
angularjs-material
reverse
imx6
sharepoint-workflow
password-protection
css-position
google-data-api
dcmtk
preloader
tcc
placeholder
xmldocument
httr
openal
lampp
geotiff
datamaps
reindex
qtranslate
appdomain
context-sensitive-grammar
git-flow
er-diagram
flyout
template-toolkit
taocp
smartfoxserver
slackware
node-request
pure-css
builtins
preprocessor
envi
tinkerpop3
ng-grid
android-dateutils
xdoclet
firebase-security
jtwig
halcon
rasterize
themoviedb-api
fuelcms
phonertc
visual-sourcesafe-2005
atoi
amiga
ocra
sql-server-data-tools
botan
mraid
zxspectrum
insight.database
mdichild
kissfft
matrix-inverse
grails-plugin-rabbitmq
dot42
radiant
git-repo
gd-graph
solace-mq
scrypt
asdf
dolby-audio-api
insert-id
server-administration
swfobject
wcf-configuration
rmiregistry
database-create
predicatebuilder
jsr286
hibernateexception
creole
http-daemon
cloudfiles
luajava
office-2007
hbm2java
feasibility
wordprocessingml
windows-identity
change-management
commercial-application

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