c# - c# 中的 DateTime 和 SQL Server 中的 DateTime 之间有什么区别吗?

标签 c# sql-server datetime

c#中的DateTime和SQL server中的DateTime有区别吗?

最佳答案

精度和范围(所以,一切都很重要;-p)

来自 MSDN:

.NET System.DateTime

The DateTime value type represents dates and times with values ranging from 12:00:00 midnight, January 1, 0001 Anno Domini (Common Era) through 11:59:59 P.M., December 31, 9999 A.D. (C.E.)

Time values are measured in 100-nanosecond units called ticks, and a particular date is the number of ticks since 12:00 midnight, January 1, 0001 A.D. (C.E.) in the GregorianCalendar calenda

Transact SQL datetime

Date Range: January 1, 1753, through December 31, 9999

Accuracy: Rounded to increments of .000, .003, or .007 seconds

关于c# - c# 中的 DateTime 和 SQL Server 中的 DateTime 之间有什么区别吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1181662/

相关文章:

c# - DJ 类效果算法的声音拉伸(stretch)

c# - ID不匹配时返回错误请求

c# - 维护 MVC 中的 URL 发布到不同的操作

c# - C# 中不一致的枚举转换结果

Pandas Period 到 to_timestamp 给我 TypeError

swift - NSDate timeIntervalSinceDate 计算错误 60 分钟

sql-server - 无法安装 Microsoft SQL Server 2008 (R2) Management Studio

sql - 默认的 T-SQL JOIN 行为是什么,INNER 还是 OUTER?

.net - TSQL - 解析执行计划以确定存储过程要返回的列

c# - 如何将 C# 日期时间值转换为 UTC 时区