ITPub博客

首页 > 应用开发 > IT综合 > Date and Time

Date and Time

原创 IT综合 作者:chenai79921 时间:2009-09-06 15:20:00 0 删除 编辑
Single-Row Functions:

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

Sysdate:返回日期年月日

[@more@]

Date and Time Datatypes

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

TIMESTAMP:The TIMESTAMP datatype stores date and time information with fractional

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

TIMESTAMP WITH TIME ZONE:The 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博客 ” ,链接:https://blog.itpub.net/11997930/viewspace-1026672/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    19
  • 访问量
    14160