当前位置:网站首页>Value range of various datetimes in SQL Server 2008
Value range of various datetimes in SQL Server 2008
2022-07-07 05:57:00 【51CTO】
stay SQL SERVER in DATETIME The time expressed is 00:00:00 To 23:59:59.997, Its time accuracy is 1/300 second , When used, it will be rounded to .000、.003 or .007 Three increments per second . The following table is DATETIME The precision of the decimal part of the second is rounded .
User specified value | Use DateTime Type, the value stored by the system |
1998-1-1 23:59:59.990 1998-1-1 23:59:59.991 | 1998-01-01 23:59:59.990 |
1998-1-1 23:59:59.992 1998-1-1 23:59:59.993 1998-1-1 23:59:59.994 | 1998-01-01 23:59:59.993 |
1998-1-1 23:59:59.995 1998-1-1 23:59:59.996 1998-1-1 23:59:59.997 1998-1-1 23:59:59.998 | 1998-01-01 23:59:59.997 |
1998-1-1 23:59:59.999 | 1998-01-02 00:00:00.000 |
stay SQL SERVER 2008 Added in Datetime2 type , It can provide higher time accuracy , And you can customize the time accuracy , This data type can be used later .Datetime2 The accuracy of 100 nanosecond .
SQL Server 2008 except DateTime and SmallDateTime outside , Four new time types have been added , Respectively :date,time,datetime2 and datetimeoffset.
Each time type range 、 Accuracy schedule :
data type | Time range | precision |
Smalldatetime | 1900-01-01 To 2079-06-06 00:00:00 To 23:59:59 | minute |
Datetime | 1753-01-01 To 9999-12-31 00:00:00 To 23:59:59.997 | 3.33 millisecond |
Time | 00:00:00.0000000 To 23:59:59.9999999 | 100 nanosecond |
Date | 0001-01-01 To 9999-12-31 | God |
Datetime2 | 0001-01-01 To 9999-12-31 00:00:00 To 23:59:59.9999999 | 100 nanosecond |
Datetimeoffset | 0001-01-01 To 9999-12-31 00:00:00 To 23:59:59.9999999 -14:00 To +14:00 | 100 nanosecond |
A list of time type expressions : data type Output time 12:35:29. 1234567 date 2007-05-08 smalldatetime 2007-05-08 12:35:00 datetime 2007-05-08 12:35:29.123 datetime2 2007-05-08 12:35:29. 1234567 datetimeoffset 2007-05-08 12:35:29.1234567 +12:15
边栏推荐
- cf:C. Column Swapping【排序 + 模擬】
- Mybaits multi table query (joint query, nested query)
- ML之shap:基于adult人口普查收入二分类预测数据集(预测年收入是否超过50k)利用shap决策图结合LightGBM模型实现异常值检测案例之详细攻略
- TCC of distributed transaction solutions
- Reptile exercises (III)
- C nullable type
- pytorch_ 01 automatic derivation mechanism
- [daily training -- Tencent selected 50] 235 Nearest common ancestor of binary search tree
- 目标检测中的损失函数与正负样本分配:RetinaNet与Focal loss
- [daily training -- Tencent selected 50] 292 Nim games
猜你喜欢
如何提高网站权重
Cf:c. column swapping [sort + simulate]
深度聚类:将深度表示学习和聚类联合优化
What are the common message queues?
Différenciation et introduction des services groupés, distribués et microservices
判断文件是否为DICOM文件
PTA ladder game exercise set l2-004 search tree judgment
软件测试面试技巧
ML之shap:基于adult人口普查收入二分类预测数据集(预测年收入是否超过50k)利用shap决策图结合LightGBM模型实现异常值检测案例之详细攻略
随机生成session_id
随机推荐
【日常训练--腾讯精选50】292. Nim 游戏
Message queuing: how to ensure that messages are not lost
ML之shap:基于adult人口普查收入二分类预测数据集(预测年收入是否超过50k)利用shap决策图结合LightGBM模型实现异常值检测案例之详细攻略
Web authentication API compatible version information
Bat instruction processing details
Forkjoin is the most comprehensive and detailed explanation (from principle design to use diagram)
R language [logic control] [mathematical operation]
Pytorch builds neural network to predict temperature
Type de texte de commutation d'entrée et de mot de passe de l'applet natif
Realize GDB remote debugging function between different network segments
C nullable type
[云原生]微服务架构是什么?
Polynomial locus of order 5
PTA 天梯赛练习题集 L2-003 月饼 测试点2,测试点3分析
404 not found service cannot be reached in SAP WebService test
[solved] record an error in easyexcel [when reading the XLS file, no error will be reported when reading the whole table, and an error will be reported when reading the specified sheet name]
牙齿干细胞的存储问题(未完待续)
原生小程序 之 input切换 text与password类型
Senior programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization, and recommends collecting
Go 語言的 Context 詳解