문제

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