sql - DB2 Between Statement for Last Sunday to This Coming Saturday -


i curious why not work:

select * table date_time_column between     current date - int((dayofweek(current date))-1)     ,     current date + int(7-(dayofweek(current date))) 

when gives me want:

select current date - int((dayofweek(current date))-1) days sysibm.sysdummy1) select current date + int(7-(dayofweek(current date))) days sysibm.sysdummy1) 

the above 2 yield correct dates want specific date time column in between. missing here?

select * table date_time_column between current date - ((dayofweek(current date))-1) days , current date + (7-(dayofweek(current date))) days 

you have signify reducing days current date shown above.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -