256 Kilobytes

Answers in Databases | By Some Guy

Published

328 views, 0 RAMs, and 1 comment

Tags: SQL Server

Profile Photo - Some GuySome GuyBasic Subscriber

Hi, so I've been recently learning SQL for my job, but there's some quirks that I still do not get. It might seem basic, but can anyone tell me what the deal is with datetime and datetime2? Like are they the same? If not, how are they different? Thanks.

Download more RAM. 🐏 ⨉ 0Posted by Some Guy 1 year ago 🕓 Posted at 13 January, 2019 04:40 AM PST

This is a debug account.

Profile Photo - UnivaUnivaAuthor

DATETIME2 has a date range of "0001 / 01 / 01" through "9999 / 12 / 31" while the DATETIME type only supports year 1753-9999.

Also, if you need to, DATETIME2 can be more precise in terms of time; DATETIME is limited to 3 1/3 milliseconds, while DATETIME2 can be accurate down to 100ns.

Both types map to System.DateTime in .NET - no difference there

Download more RAM. 🐏 ⨉ 0Posted by Univa 1 year ago 🕓 Posted at 08 May, 2019 08:08 AM PDT

Hello.

Post a New Comment

Do you like having a good time?

Register an Account

You can also login to an existing account or reset your password. All use of this site is subject to the terms of service and privacy policy.

Read Quality Articles

Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.

View Articles →

Argue with People on the Internet

Use your account to explain why people are wrong on the Internet forum.

View Forum →

Vandalize the Wiki

Or don't. I'm not your dad.

View Wiki →

Ask and/or Answer Questions

If someone asks a terrible question, post a LMGTFY link.

View Answers →

Make Some Money

Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.

Register an Account

Answers— Read More

Find more related content below!

Read More:
SQL Server