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
Wall covered with many vintage clocks showing different times

SQL SERVER – Lots of Date Functions – Find Right One to Use – Quiz – Puzzle – 27 of 31

January 28, 2012
Pinal Dave
SQL Puzzle
SQL DateTime, SQL Server

SQL Server has lots of date functions; can you pick the right one? Quiz 27 of 31, built from a question in my SQL Server Interview Questions and Answers book.

Read More
SQL SERVER - DATEDIFF - Accuracy of Various Dateparts

SQL SERVER – DATEDIFF – Accuracy of Various Dateparts

October 21, 2011
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

Why does DATEDIFF say 1 minute between two times only 3 seconds apart? It is not a bug. Here is how DATEDIFF counts datepart boundaries.

Read More
SQL SERVER 2012 - DateTime Functions - DATEFROMPARTS() - DATETIMEFROMPARTS() - DATETIME2FROMPARTS()

SQL SERVER 2012 – DateTime Functions – DATEFROMPARTS() – DATETIMEFROMPARTS() – DATETIME2FROMPARTS()

September 19, 2011
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server, SQL Server 2012

SQL Server 2012 adds seven new datetime functions, such as DATEFROMPARTS, DATETIMEFROMPARTS and EOMONTH. A quick look at building dates from their parts.

Read More
SQL SERVER - Information Related to DATETIME and DATETIME2

SQL SERVER – Information Related to DATETIME and DATETIME2

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

A reader comment explains the precision issue between DATETIME and DATETIME2: values lose precision when converted between types. Here is the workaround.

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
Previous 1 … 10 11 12 13 14 15 16 … 19 Next
  • Books
  • Testimonials
  • Privacy Policy

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