当前位置:网站首页>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
边栏推荐
- 老板总问我进展,是不信任我吗?(你觉得呢)
- Web architecture design process
- pytorch_ 01 automatic derivation mechanism
- Harmonyos practice - Introduction to development, analysis of atomized services
- STM32 key state machine 2 - state simplification and long press function addition
- 谈fpga和asic的区别
- Web authentication API compatible version information
- Go语学习笔记 - gorm使用 - 原生sql、命名参数、Rows、ToSQL | Web框架Gin(九)
- zabbix_get测试数据库失败
- Différenciation et introduction des services groupés, distribués et microservices
猜你喜欢
yarn入门(一篇就够了)
Go language learning notes - Gorm use - Gorm processing errors | web framework gin (10)
三级菜单数据实现,实现嵌套三级菜单数据
Red Hat安装内核头文件
一个简单的代数问题的求解
目标检测中的损失函数与正负样本分配:RetinaNet与Focal loss
苹果cms V10模板/MXone Pro自适应影视电影网站模板
Message queuing: how to ensure that messages are not lost
深度聚类:将深度表示学习和聚类联合优化
ML之shap:基于adult人口普查收入二分类预测数据集(预测年收入是否超过50k)利用shap决策图结合LightGBM模型实现异常值检测案例之详细攻略
随机推荐
深度聚类:将深度表示学习和聚类联合优化
OpenSergo 即将发布 v1alpha1,丰富全链路异构架构的服务治理能力
原生小程序 之 input切换 text与password类型
[shell] clean up nohup Out file
成为资深IC设计工程师的十个阶段,现在的你在哪个阶段 ?
PTA ladder game exercise set l2-002 linked list de duplication
How to get free traffic in pinduoduo new store and what links need to be optimized in order to effectively improve the free traffic in the store
绕过open_basedir
Personal imitation SSM framework
linear regression
Nodejs get client IP
Bat instruction processing details
SQL query: subtract the previous row from the next row and make corresponding calculations
Flask 1.1.4 werkzeug1.0.1 analyse du code source: processus de démarrage
win配置pm2开机自启node项目
Flask1.1.4 werkzeug1.0.1 source code analysis: start the process
往图片添加椒盐噪声或高斯噪声
如何提高网站权重
谈fpga和asic的区别
《HarmonyOS实战—入门到开发,浅析原子化服务》