The MSDN documentation for datetime recommends using datetime2.

datetime2 has larger date range, a larger default fractional precision, and optional user-specified precision. Also depending on the user-specified precision it may use less storage.

Furthermore, datetime2 has a date range of “0001 / 01 / 01” through “9999 / 12 / 31” while the datetime type only supports year 1753-9999. If your need is precesion, 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.

Advertisements

Posted by TheBojan

http://www.thebojan.ninja/ http://www.thebojan.se/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s