Hello everyone I have one query I'm running migration for adding a new table and column it's working. I have created a column createdon with DateTime datatype. Now we have a check table here datetime2 type store.Please let me know why it is datetime2 store.
Datetime2 in sql.
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sachin SinghRank #66 · 26.2K reputationPosted May 26, 2022, 2:39 AM EDT
System.DateTimemaps directly to SQL Serverdatetime2and is the Microsoft recommended datatype for storage of aSystem.DateTimein SQL Server.Also worth noting that a
datetime2(7)takes one less byte of space than adatetimeand offers increased precision.RohanRank #1,548 · 1K reputationPosted May 25, 2022, 4:30 AM EDT
Sachin Singh, I do not understand.
RohanRank #1,548 · 1K reputationPosted May 26, 2022, 12:48 AM EDT