This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I am connecting to a data base and want the Data pull to always start on the previous Monday. The expression is called return_date and I cant get any criteria to work. Any suggestions?
In Microsoft SQL Server, you could use the following query to select all records from a table from the previous Monday onwards.
select *from my_tablewhere my_date >= dateadd(week,datediff(week,0,getdate()),0);
The exact syntax will depend on the type of database you are using.
I've created an example in SQL Fiddle that you can use to explore the query or adapt it for a different flavour of SQL.