This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Rich still life of five upright slate, sage and ivory books beside a leaning book and an oak bookend.

Inclusive End Dates: Why BETWEEN Misses the Last Day

July 25, 2010
Pinal Dave
SQL Tips and Tricks
SQL Coding Standards, SQL Datatype, SQL DateTime, SQL Server

Inclusive end dates describe whole calendar days, while BETWEEN compares the exact supplied endpoints. A date endpoint becomes midnight when compared with timestamp rows. A guarded disposable fixture makes the boundary conditions explicit.

Read More
SQL SERVER - Datetime Function TODATETIMEOFFSET Example

SQL SERVER – Datetime Function TODATETIMEOFFSET Example

July 16, 2010
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

A quick example of the datetime function TODATETIMEOFFSET in SQL Server, and how it differs from SWITCHOFFSET when offsets change.

Read More
SQL Server offset settings.

SQL SERVER – Datetime Function SWITCHOFFSET Example

July 15, 2010
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

SWITCHOFFSET changes a datetimeoffset value from its stored time zone offset to a new one. Here is a quick example of how it works in SQL Server 2008.

Read More
Last date of a date table.

SQL SERVER – Difference Between DATETIME and DATETIME2 – WITH GETDATE

June 12, 2010
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

I repeat my DATETIME and DATETIME2 test with GETDATE instead of SYSDATETIME. See how the distinct values in each column compare this time.

Read More
Results window of join fails join.

SQL SERVER – Difference Between DATETIME and DATETIME2

June 11, 2010
Pinal Dave
SQL Performance
SQL DateTime, SQL Scripts

A developer filled a DATETIME and a DATETIME2 column with the same value and got different results. Here is the difference between DATETIME and DATETIME2.

Read More
SQL SERVER - Difference Between GETDATE and SYSDATETIME

SQL SERVER – Difference Between GETDATE and SYSDATETIME

June 10, 2010
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

What is the difference between GETDATE and SYSDATETIME? GETDATE stops at milliseconds, while SYSDATETIME in SQL Server 2008 goes much finer.

Read More
SQL SERVER – Precision of SMALLDATETIME – A 1 Minute Precision

SQL SERVER – Precision of SMALLDATETIME – A 1 Minute Precision

June 1, 2010
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

The precision of SMALLDATETIME is 1 minute. Seconds are rounded up or down to the nearest minute, and this simple example shows exactly how.

Read More
Previous 1 … 17 18 19 20 21 22 23 … 29 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com