The PRINT date format differs from the SELECT format, because PRINT converts the value to text first. This post tests PRINT with six date and time types, shows why joining text and a datetime fails with Msg 241, shows how the session language changes the month name, and gives the formats that stay the same everywhere.
DATETIMEFROMPARTS Function: Build Dates From Parts
The DATETIMEFROMPARTS function builds a datetime value from seven numbers, with no string conversion and no language trap. This post tests how it rounds milliseconds, which parts raise an error, how it treats NULL, and how its relatives build dates, times and offsets.
Period-to-Date Totals: Today, Week, Month and Year in One Scan
Calculate period-to-date totals with shared scan boundaries, Monday-based weeks, and older date arithmetic for SQL Server reports.
Price in Effect on a Date: Querying a Price History Table
Query a price history table for the price effective on each order date, enforce unique starts, and compare APPLY lookups with range joins.
Scheduling Recurring Events: Every Second Tuesday in T-SQL
Generate recurring events with stable weekday arithmetic, monthly ranking, and anchored fourteen-day rules instead of endless date rows.
Current Language of a SQL Server Session: How to Check It
To find the current language of a SQL Server session, read @@LANGUAGE or @@LANGID, or query sys.dm_exec_sessions. This post tests each one, switches the session to German and British, and shows how the language changes month names and how text turns into dates.
Finding Free Time Slots in a Calendar With GENERATE_SERIES
Find free time slots with GENERATE_SERIES, exclude overlapping bookings, and merge busy intervals before calculating calendar gaps.







