Running start times depend on the durations that precede each activity. Use ordered window sums while retaining full dates and explicit end boundaries.
SQL SERVER – Retrieve – Select Only Date Part From DateTime – Best Practice – Part 2
Which way to select only date part from DATETIME is faster? After more tests on large tables, I now suggest the DATEADD and DATEDIFF method over CONVERT.
SWITCHOFFSET Versus TODATETIMEOFFSET: Two Offset Operations
SWITCHOFFSET versus TODATETIMEOFFSET depends on the input contract. Preserve a known instant or attach an offset to a genuinely local clock.
DATETIMEOFFSETFROMPARTS: Build an Explicit Offset
DATETIMEOFFSETFROMPARTS constructs a local clock with an explicit offset. Keep both component signs consistent and validate the complete input.
SQL SERVER – Interview Questions and Answers – Part 6
Part 6 of my SQL Server Interview questions and answers covers SQL Server 2008, starting with what the master, msdb, model, tempdb and resource databases do.
SQL SERVER – Few Useful DateTime Functions to Find Specific Dates
Useful DateTime functions from Vivek Jamwal: find today, yesterday, and the first and last day of the current or last week and month with DATEADD.
Stable Weekday Numbers Without Changing DATEFIRST
Stable weekday numbers use a fixed Monday anchor and negative-safe modulo. Map Monday to one without changing DATEFIRST or session language.







