当前位置:网站首页>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
边栏推荐
- Go语学习笔记 - gorm使用 - gorm处理错误 | Web框架Gin(十)
- What is make makefile cmake qmake and what is the difference?
- 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
- Reptile exercises (III)
- STM32 key state machine 2 - state simplification and long press function addition
- Bbox regression loss function in target detection -l2, smooth L1, IOU, giou, Diou, ciou, focal eiou, alpha IOU, Siou
- make makefile cmake qmake都是什么,有什么区别?
- Lombok plug-in
- 【已解决】记一次EasyExcel的报错【读取xls文件时全表读不报错,指定sheet名读取报错】
- Web architecture design process
猜你喜欢
随机推荐
绕过open_basedir
Red hat install kernel header file
Forkjoin is the most comprehensive and detailed explanation (from principle design to use diagram)
得物客服一站式工作台卡顿优化之路
ForkJoin最全详解(从原理设计到使用图解)
Question 102: sequence traversal of binary tree
【FPGA教程案例13】基于vivado核的CIC滤波器设计与实现
@pathvariable 和 @Requestparam的详细区别
Introduction to distributed transactions
Red Hat安装内核头文件
Go 語言的 Context 詳解
原生小程序 之 input切換 text與password類型
Go语学习笔记 - gorm使用 - gorm处理错误 | Web框架Gin(十)
CTFshow--常用姿势
Reading notes of Clickhouse principle analysis and Application Practice (6)
Flask1.1.4 Werkzeug1.0.1 源碼分析:啟動流程
[shell] clean up nohup Out file
The 2022 China low / no code Market Research and model selection evaluation report was released
mac版php装xdebug环境(m1版)
Go language learning notes - Gorm use - Gorm processing errors | web framework gin (10)





![[InstallShield] Introduction](/img/df/4522d06510ff918d00659b8358368f.jpg)



