当前位置:网站首页>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
边栏推荐
- PTA ladder game exercise set l2-002 linked list de duplication
- Go language learning notes - Gorm use - Gorm processing errors | web framework gin (10)
- OpenSergo 即将发布 v1alpha1,丰富全链路异构架构的服务治理能力
- Data storage 3
- 话说SQLyog欺骗了我!
- 目标检测中的损失函数与正负样本分配:RetinaNet与Focal loss
- Distributed global ID generation scheme
- Go 語言的 Context 詳解
- C nullable type
- Hcip seventh operation
猜你喜欢

随机生成session_id

Reptile exercises (III)

Get the way to optimize the one-stop worktable of customer service

Interview skills of software testing

Harmonyos practice - Introduction to development, analysis of atomized services

What is dependency injection (DI)

深度聚类:将深度表示学习和聚类联合优化

Determine whether the file is a DICOM file

2pc of distributed transaction solution

【SQL实战】一条SQL统计全国各地疫情分布情况
随机推荐
cf:C. Column Swapping【排序 + 模拟】
Differences and introduction of cluster, distributed and microservice
Data storage 3
nVisual网络可视化
PTA 天梯赛练习题集 L2-003 月饼 测试点2,测试点3分析
Opensergo is about to release v1alpha1, which will enrich the service governance capabilities of the full link heterogeneous architecture
Senior programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization, and recommends collecting
What is dependency injection (DI)
Get the way to optimize the one-stop worktable of customer service
Nodejs get client IP
AI face editor makes Lena smile
一个简单的代数问题的求解
【Shell】清理nohup.out文件
微信小程序蓝牙连接硬件设备并进行通讯,小程序蓝牙因距离异常断开自动重连,js实现crc校验位
【已解决】记一次EasyExcel的报错【读取xls文件时全表读不报错,指定sheet名读取报错】
得物客服一站式工作台卡顿优化之路
linear regression
EMMC打印cqhci: timeout for tag 10提示分析与解决
980. 不同路径 III DFS
Wechat applet Bluetooth connects hardware devices and communicates. Applet Bluetooth automatically reconnects due to abnormal distance. JS realizes CRC check bit