سؤال

Microsoft did introduce the Datetime2 type in SQL server 2008.

However, even with VS 2010 (made by the same compagny and realeased 2 years after MSSQL2008), I couldn't find a variable type that would handle Datetime2 with full precision.

Is there any variable type that would allow me to handle Datatime2 in .NET without any precision lost?

If the answer is no, do you know if Microsoft have any plan about creating such type in a near future?

هل كانت مفيدة؟

المحلول

Take a look at the MSDN Page for Mapping CLR Parameter Data. According to MSDN, your best bet for mapping Datetime2 is using DateTime or Nullable<DateTime>.

If neither of those meet your requirements, then I'm guessing the answer would be no and I don't think Microsoft would be releasing anything in the near future.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top