Wednesday, January 20, 2021

DATETIME vs DATETIME2 - 5 reasons why DATETIME2 is better

Recommendation first: if you are not sure whether to choose Datetime or Datetime2 the answer is choose Datetime2. Why?
  1. Higher precision – up to 7 fractional digits for datetime2 vs 3 for datetime 
  2. Higher level of accuracy – datetime rounds the last digit to an increment of .000, .003 or .007 whereas datetime2 supports accuracy of 100 nanoseconds 
  3. Wider range of values – datetime2 supports dated from 0001-01-01 00:00:00 to 9999-12-31 23:59:59.9999999 whereas datetime supports dates from 1753-01-01 00:00:00 to 9999-12-31 23:59:59.997 
  4. Space requirements – depending on the fractional precision you require datetime2 needs from 6 Bytes to 8 bytes of space whereas datetime requires 8 bytes 
  5. Compliance with standards: datetime2 is compliant with both ANSI and ISO 8601 whereas datetime is not.
For a more in depth review of those reasons you can check our other post here.

Related Posts:

  • xSQL Builder – the tool for software publishers If you publish software that uses SQL Server on the backend then you are familiar with the pain of upgrading your clients from one version of your software to another. Some of the most common challenges you face include: Th… Read More
  • xSQL Software gets a brand new lookVisitors to xSQL Software’s website today will be greeted by a brand new look – we have changed the logo and the whole website. Why change the logo? We loved our logo from the day we approved it about 9 years ago and still … Read More
  • Paypal payment solutions - need improvementSince Paypal (it’s parent eBay at the time) acquired Verisign’s payment gateway in 2005 we have been a Paypal customer and aside from a complete screw up a couple of years ago that left us without service for 3 days everythin… Read More
  • xsqlsoftware.com is now xsql.com We are very excited to announce that as of March 10, 2012 the primary domain for xSQL Software is http://www.xsql.com  Here are a few housekeeping items: Email addresses: all email addresses have been changed to the ne… Read More
  • 10 days, 10 free Oracle Data Compare licenses each dayStarting today (March 26, 2012) we will be giving away 10 Oracle Data Compare licenses (a $349 value) for free, every day for 10 days. The promo code ODC10DAYS will be active for a few minutes each day. The starting… Read More

0 comments:

Post a Comment