I recently received the following question through email and I found it very interesting so I want to share it with you. “Hi Pinal, In SQL statement below the time difference between two given dates is 3 sec, but when checked in terms of Min it says 1 Min (whereas the actual min is 0.05Min) [...]
Archive for the ‘SQL DateTime’ Category
SQL SERVER – DATEDIFF – Accuracy of Various Dateparts
Posted in Pinal Dave, PostADay, SQL, SQL Authority, SQL DateTime, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology on October 21, 2011 | 8 Comments »
SQL SERVER – Information Related to DATETIME and DATETIME2
Posted in Pinal Dave, SQL, SQL Authority, SQL DateTime, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology on November 15, 2010 | 2 Comments »
I recently received interesting comment on the blog regarding workaround to overcome the precision issue while dealing with DATETIME and DATETIME2. I have written over this subject earlier over here. SQL SERVER – Difference Between GETDATE and SYSDATETIME SQL SERVER – Difference Between DATETIME and DATETIME2 – WITH GETDATE SQL SERVER – Difference Between DATETIME [...]
SQL SERVER – Datetime Function TODATETIMEOFFSET Example
Posted in Pinal Dave, SQL, SQL Authority, SQL DateTime, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology on July 16, 2010 | 5 Comments »
Earlier I wrote about SQL SERVER – Datetime Function SWITCHOFFSET Example. After reading this blog post, I got another quick reply that if I can explain the usage of TODATETIMEOFFSET as well. Let us go over the definition of the TODATETIMEOFFSET from BOL: Returns a datetimeoffset value that is translated from a datetime2 expression. What [...]
SQL SERVER – Datetime Function SWITCHOFFSET Example
Posted in Pinal Dave, SQL, SQL Authority, SQL DateTime, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology on July 15, 2010 | 3 Comments »
I was recently asked if I know how SWITCHOFFSET works. This feature only works in SQL Server 2008. Here is quick definition of the same from BOL: Returns a datetimeoffset value that is changed from the stored time zone offset to a specified new time zone offset. What essentially it does is that changes the [...]
SQL SERVER – Difference Between DATETIME and DATETIME2 – WITH GETDATE
Posted in Pinal Dave, SQL, SQL Authority, SQL DateTime, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology on June 12, 2010 | 7 Comments »
Earlier I wrote blog post SQL SERVER – Difference Between GETDATE and SYSDATETIME which inspired me to write SQL SERVER – Difference Between DATETIME and DATETIME2. Now earlier two blog post inspired me to write this blog post (and 4 emails and 3 reads from readers). I previously populated DATETIME and DATETIME2 field with SYSDATETIME, [...]
free community tool
About Pinal Dave
Pinal Dave is a Microsoft Technology Evangelist (Database and BI). He has written over 2000 articles on the subject on his blog at http://blog.sqlauthority.com. Along with 8+ years of hands on experience he holds a Masters of Science degree and a number of certifications, including MCTS, MCDBA and MCAD (.NET). He is co-author of three SQL Server books - SQL Server Programming, SQL Wait Stats and SQL Server Interview Questions and Answers. Prior to joining Microsoft he was awarded Microsoft MVP award for three continuous years for his contribution in community.
Follow @pinaldave Send +Pinal Dave an email at pinal@sqlauthority.com
-
Blog Stats
- 36,693,887 (36 Million+)
Next Office Hours
Books I Authored
SQLAuthority Links
Subscribe to Newsletter
My Homepage
Windows Live Blog
--------------------
Top Downloads
PDF Downloads
Script Downloads
Script Bank
Favorite Scripts
All Scripts - 1
All Scripts - 2
All Scripts - 3
Top Articles
Best Articles
Favorite Articles - 1
Favorite Articles - 2
--------------------
> SQL Interview Q & A <
SQL Coding Standards
SQL FAQ Download
--------------------
Jobs @ SQLAuthority
About Nupur Dave
Nupur Dave loves technology simply because it makes life more convenient. She is devoted to technology because it touches our heart makes our daily lives easier. Among the many technological programs she uses and embraces Windows Live most because she can do lots of things with ease – from photo management to movies; business emails to personal social media connections.
Disclaimer
This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet/ BOL. My employer do not endorse any tools, applications, books, or concepts mentioned on the blog. I have documented my personal experience on this blog.
Categories
- About Me (145)
- Best Practices (143)
- Business Intelligence (36)
- CodeProject (10)
- Data Warehousing (49)
- Database (321)
- DBA (137)
- DMV (13)
- Joes 2 Pros (47)
- MVP (147)
- PASS (14)
- Readers Contribution (114)
- Readers Question (126)
- SharePoint (7)
- Software Development (69)
- SQL Add-On (99)
- SQL Azure (15)
- SQL Backup and Restore (79)
- SQL BOL (11)
- SQL Coding Standards (21)
- SQL Constraint and Keys (57)
- SQL Cursor (28)
- SQL Data Storage (59)
- SQL DateTime (47)
- SQL DMV (23)
- SQL Documentation (299)
- SQL Download (310)
- SQL Error Messages (161)
- SQL Function (161)
- SQL Humor (29)
- SQL in Sixty Seconds (1)
- SQL Index (155)
- SQL Interview Questions and Answers (139)
- SQL Joins (77)
- SQL Milestone (25)
- SQL Optimization (152)
- SQL PASS (20)
- SQL Performance (340)
- SQL Puzzle (94)
- SQL Security (127)
- SQL Server DBCC (42)
- SQL Server Management Studio (44)
- SQL Service Pack (13)
- SQL Stored Procedure (116)
- SQL String (26)
- SQL System Table (61)
- SQL Trigger (24)
- SQL User Group (57)
- SQL Utility (153)
- SQL View (26)
- SQL Wait Stats (41)
- SQL Wait Types (42)
- SQL White Papers (67)
- SQL XML (12)
- SQLAuthority (632)
- SQL Training (19)
- SQLAuthority Author Visit (141)
- SQLAuthority Book Review (39)
- SQLAuthority News (577)
- SQLAuthority Website Review (42)
- SQLServer (227)
- Tech (1587)
- Pinal Dave (1574)
- SQL Scripts (860)
- Technology (2032)
- PostADay (453)
- SQL (2032)
- SQL Authority (2032)
- SQL Query (2031)
- SQL Server (2032)
- SQL Tips and Tricks (2032)
- T SQL (2032)
- Video (5)
Top 3 Commenters









