What happens when you convert DATE and TIME in SQL Server 2008 to DATETIME? A quick demo shows the midnight and 1900 surprise.
Finding the First Monday of Every Month in T-SQL
Calculate the first Monday without DATEFIRST, list a full year, find nth and last weekdays, and reuse the rules in an inline table function.
Mapping MySQL Data Types to SQL Server
Mapping MySQL data types requires checking signed ranges, text encoding, date limits, and application behavior before choosing SQL Server columns.
SQL SERVER – Get Date of All Weekdays or Weekends of the Year
Tejas Shah’s easy script to list the date of all weekdays or weekends of a year with a recursive CTE, first written to find every Sunday of 2010.
DATETIME2FROMPARTS: Match Fractions to Precision
DATETIME2FROMPARTS constructs a complete typed timestamp. Match fraction units to precision and preserve valid calendar components.
DATEADD Fractional Numbers: Truncate Before Addition
DATEADD fractional numbers are truncated, not rounded. Compare positive and negative day additions while preserving an explicitly typed date input.
Preventing Overlapping Date Ranges in a Table
Detect overlapping date ranges with joins and window queries, use half-open endpoints, and enforce the rule with a multirow trigger.







