Date and Time

Single-Row Functions:

Systimestamp:返回日期年月日,时分秒,秒精确到6位,并且返回时区。

Sysdate:返回日期年月日

[@more@]

Date and Time Datatypes

DATEThe DATE datatype stores century, year, month, date, hour, minute, and seconds internally

TIMESTAMPThe TIMESTAMP datatype stores date and time information with fractional

seconds precisionThe default precision is 6 and can range from 0 to 9.

TIMESTAMP WITH TIME ZONEThe TIMESTAMP WITH TIME ZONE datatype is similar to the TIMESTAMP datatype, but it stores the time zone displacement.

TIMESTAMP WITH LOCAL TIME ZONE

TIMESTAMP WITHLOCAL TIME ZONE does not store the displacement information in thedatabase, but stores the time as a normalized form of the database time zone.The data is always stored in the database time zone, but when the userretrieves data, it is shown in the user’s local session time zone.

INTERVAL YEAR TO MONTH

Specification INTERVAL YEAR [(precision)] TO MONTH

The INTERVAL YEAR TO MONTH datatype is used to represent a period of time as years and months. The precision specifies the precision needed for the year field, and its default is 2.

INTERVAL DAY TO SECOND

Specification INTERVAL DAY [(precision)] TO SECOND

The INTERVAL DAY TO SECOND datatype is used to represent a period of time as days, hours, minutes, and seconds. The precision specifies the precision needed for the day field, and its default is 6. Valid precision values are from 0 to 9.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11997930/viewspace-1026672/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11997930/viewspace-1026672/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值