Date and Time Calculations Made Easy with EOMONTH, DATEDIFF, and DATEADD
Learn how to work with dates and calculate particular dates or elapsed time periods with some of the functions available in SQL Server.
2025-05-09
2,713 reads
Learn how to work with dates and calculate particular dates or elapsed time periods with some of the functions available in SQL Server.
2025-05-09
2,713 reads
2025-03-03
474 reads
2024-08-02
492 reads
2024-07-08
448 reads
2024-07-03
130 reads
Learn to calculate Start / First of Week, End of Week, Start of Next Week, Year, Quarter, and Month of the week, Week Numbers and more in T-SQL (Jeff Moden)
2022-07-13
32,836 reads
In the second part of this PostgreSQL date time series, we examine a number of commonly used functions for getting current dates and times and converting strings to dates and times.
2021-09-22
3,459 reads
2021-06-28
718 reads
By Steve Jones
This value is something that I still hear today: our best work is done...
By gbargsley
Have you ever received the dreaded error from SQL Server that the TempDB log...
By Chris Yates
Artificial intelligence is no longer a distant concept. It is here, embedded in the...
A variety of food testing services, such as nutritional testing, water testing, milk testing,...
Comments posted to this topic are about the item Planning for tomorrow, today -...
We have a BI-application that connects to input tables on a SQL Server 2022...
I try to run this code on SQL Server 2022. All the objects exist in the database.
CREATE OR ALTER VIEW OrderShipping AS SELECT cl.CityNameID, cl.CityName, o.OrderID, o.Customer, o.OrderDate, o.CustomerID, o.cityId FROM dbo.CityList AS cl INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID GO CREATE OR ALTER FUNCTION GetShipCityForOrder ( @OrderID INT ) RETURNS VARCHAR(50) WITH SCHEMABINDING AS BEGIN DECLARE @city VARCHAR(50); SELECT @city = os.CityName FROM dbo.OrderShipping AS os WHERE os.OrderID = @OrderID; RETURN @city; END; goWhat is the result? See possible answers