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
Gouache painting: a second towel lies loose beside it

DATETIMEOFFSETFROMPARTS: Build an Explicit Offset

October 2, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Server

DATETIMEOFFSETFROMPARTS constructs a local clock with an explicit offset. Keep both component signs consistent and validate the complete input.

Read More
questions

SQL SERVER – Interview Questions and Answers – Part 6

September 17, 2008
Pinal Dave
SQL Interview Questions and Answers
Database, SQL Data Storage, SQL DateTime, SQL Function, SQL Index, SQL Scripts, SQL Server, SQL Utility

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.

Read More
SQL SERVER - Few Useful DateTime Functions to Find Specific Dates

SQL SERVER – Few Useful DateTime Functions to Find Specific Dates

August 29, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

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.

Read More
Seven smooth stones on a wooden tray beside a sage bowl, with one stone tied in red ribbon and a pale folded cloth.

Stable Weekday Numbers Without Changing DATEFIRST

August 17, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

Stable weekday numbers use a fixed Monday anchor and negative-safe modulo. Map Monday to one without changing DATEFIRST or session language.

Read More
Two gooseberry rows and two harvest baskets stand beside a wooden crossbar spanning both rows.

Year-to-Date Totals Next to the Same Period Last Year

August 14, 2008
Pinal Dave
SQL Tips and Tricks
Best Practices, Business Intelligence, SQL DateTime

A fair year-to-date comparison needs the same dates from last year. Here is a short query, plus the leap day trap.

Read More
SQL SERVER - 2008 - Get Current System Date Time

SQL SERVER – 2008 – Get Current System Date Time

August 1, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

Several ways to get the current system date time in SQL Server 2008, from GETDATE to the newer functions, with a quick video on the topic.

Read More
A brass sextant on a coil of rope on a boat deck at dawn, a red scarf tied to the rail

SQL SERVER – 2008 – Find Current System Date Time and Time Offset

July 31, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

SQL Server 2008 adds SYSDATETIMEOFFSET, which returns the current system date time along with its time offset from GMT. One line shows how.

Read More
Previous 1 … 21 22 23 24 25 26 27 … 29 Next
  • Books
  • Testimonials
  • Privacy Policy

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