Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql server get date of previous sunday

--start of last week
SELECT DATEADD(wk, DATEDIFF(wk, 6, GETDATE()), 0)

--end of last week
SELECT DATEADD(wk, DATEDIFF(wk, 6, GETDATE()), 6)
Comment

PREVIOUS NEXT
Code Example
Sql :: use of undefined constant mysql_assoc - assumed 
Sql :: psql store procedure-return multiple table values 
Sql :: java.sql.sqlexception: the url cannot be null 
Sql :: mysql group rows with same value 
Sql :: h2 auto increment and unique 
Sql :: import sql file to mysql db using shell commands 
Sql :: Create parameterized VIEW in SQL Server 
Sql :: wp sql to update admin email 
Sql :: sql group_concat 
Sql :: SQL Comments Within Statements 
Sql :: postgres create trigger if not exists 
Sql :: sql server epoch to datetime 
Sql :: sql convert int to string 
Sql :: oracle swap partition 
Sql :: postgresql create user roles 
Sql :: alter table add multiple columns mysql 
Sql :: join three tables sql 
Sql :: oracle kill sessions script 
Sql :: get substract count sql 
Sql :: sql server download for windows 10 64 bit 
Sql :: _ Wildcard in SQL 
Sql :: mysql insert into multiple tables 
Sql :: sql transaction 
Sql :: quit mysql 
Sql :: postgres jsonb array push new element 
Sql :: subquery sql 
Sql :: if mysql UPDATE 
Sql :: mysql case sensitive ? 
Sql :: Insert into Select * - NAYCode.com 
Sql :: will graphql replace sql 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =