当前位置:网站首页>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
边栏推荐
- 话说SQLyog欺骗了我!
- 绕过open_basedir
- Modes of optical fiber - single mode and multimode
- win配置pm2开机自启node项目
- PTA 天梯赛练习题集 L2-002 链表去重
- 爬虫练习题(三)
- pytorch_ 01 automatic derivation mechanism
- 数据中心为什么需要一套基础设施可视化管理系统
- The 2022 China low / no code Market Research and model selection evaluation report was released
- make makefile cmake qmake都是什么,有什么区别?
猜你喜欢
[daily training -- Tencent selected 50] 235 Nearest common ancestor of binary search tree
【FPGA教程案例14】基于vivado核的FIR滤波器设计与实现
Question 102: sequence traversal of binary tree
Modes of optical fiber - single mode and multimode
Pytorch builds neural network to predict temperature
【日常训练--腾讯精选50】235. 二叉搜索树的最近公共祖先
R language [logic control] [mathematical operation]
C nullable type
AI face editor makes Lena smile
TCC of distributed transaction solutions
随机推荐
Web Authentication API兼容版本信息
PowerPivot - DAX (function)
牙齿干细胞的存储问题(未完待续)
Digital IC interview summary (interview experience sharing of large manufacturers)
CTFshow--常用姿势
《HarmonyOS实战—入门到开发,浅析原子化服务》
[daily training -- Tencent selected 50] 235 Nearest common ancestor of binary search tree
谈fpga和asic的区别
Red hat install kernel header file
2pc of distributed transaction solution
三级菜单数据实现,实现嵌套三级菜单数据
目标检测中的BBox 回归损失函数-L2,smooth L1,IoU,GIoU,DIoU,CIoU,Focal-EIoU,Alpha-IoU,SIoU
SAP Spartacus checkout 流程的扩展(extend)实现介绍
PTA ladder game exercise set l2-002 linked list de duplication
深度聚类:将深度表示学习和聚类联合优化
老板总问我进展,是不信任我吗?(你觉得呢)
What is dependency injection (DI)
Things about data storage 2
Reptile exercises (III)
高级程序员必知必会,一文详解MySQL主从同步原理,推荐收藏