Thursday, 22 March 2018

how to get data of current week only in SQL server.

get current week record in sql server
Description:
In this example we explain that how to get records of current week using SQL Server. Or SQL Query to get the This week record in SQL Server. Or SQL Query to return all records from current week using SQL Server. Or SQL query to select all records created in current week. Or how to retrieve current week date values in SQL Server.


Here we demonstrate that how to get data of current week only in SQL Server. Or select dates within the current week date range in SQL Server.
Query:

SELECT *
FROM [dbo].[Order]
WHERE [Loading Date] >= dateadd(day, 1-datepart(dw, getdate()), CONVERT(date,getdate())) AND [Loading Date] <  dateadd(day, 8-datepart(dw, getdate()), CONVERT(date,getdate()))




This entry was posted in :

0 comments:

Post a Comment