在SQL Server中的c#和DateTime之间的DateTime有什么区别吗? [英] Is there any difference between DateTime in c# and DateTime in SQL server?

查看:89
本文介绍了在SQL Server中的c#和DateTime之间的DateTime有什么区别吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案

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



从MSDN:



.Net System.DateTime


DateTime值类型表示日期和时间,取值范围为0001年1月1日凌晨12:00:00 Anno Domini(普通时代)至9999年12月31日11:59:59 PM(CE)



时间值以100纳秒为单位称为刻度,特定日期是自格雷戈里亚日历日历公元0001年1月1日凌晨12:00起的刻度数


Transact SQL datetime


日期范围:1753年1月1日,通过9999年12月31日



精度:舍入为0.000,.003或.007秒的增量



Is there any difference between DateTime in c# and DateTime in SQL server?

解决方案

Precision and range (so, everything important ;-p)

From 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

这篇关于在SQL Server中的c#和DateTime之间的DateTime有什么区别吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆