sql语句时间日期最全方法(国外英文资料).doc

sql语句时间日期最全方法(国外英文资料).doc

  1. 1、本文档共23页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
sql语句时间日期最全方法(国外英文资料)

sql语句时间日期最全方法(国外英文资料) The application of time in Oracle 1, the conversion function The biggest relationship to date is the two conversion functions: to_date (), to_char () The to_date () effect converts character types to date types in a certain format: Specific usage: to_date ( 2004-11-27 , yyyy-mm-dd), the former is a string, the latter is the conversion date format, and notice that the two must be matched in one. Such as; To_date ( 2004-11-27 13:34:43 , yyyy-mm-dd hh24: mi: ss) will be given a specific time Multiple date formats: YYYY: four years YYY, YY, Y: the last three, two or one of the years, the default is the current century MM: the month number of 01-12 MONTH: the MONTH when the nine characters are represented, the right is filled with white space MON: a three-character month abbreviation WW: the week of the year D: the day of the week DD: the first few days of the month DDD: the first few days of the year DAY: the full name of the nine characters of the DAY, and the right-hand side is filled with white space HH, HH12: the first hour of the day, 12 in notation HH24: the first hour of the day, the value is 00 ~ 23 MI: in an hour SS: in a minute SSSS: the number of seconds since midnight To_char () : change the date to a certain format for the character type SQL select to_char (sysdate, yyyy-mm-dd hh24: mi: ss) time from dual; TIME -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- The 2004-10-08 15:22:58 Convert the current time to yyyy-mm-dd hh24: mi: ss format into character type The date is processed in oracle TO_DATE format Day: Dd number 12 Dy abbreviated fri Day spelled out Friday DDSPTH spelled out, ordinal twelfth The Month: Mm number 3 Mon abbreviated mar The month spelled out a march Year: Yy two who 98 Yyyy four who 1998 24 hour format: 0:00-23:59:59... 12-hour format: 1:00-12:59:59... [ZT] date and time function summarize 1. Date and character conversion function usage (to_date, to_char) 2. Select to_char (to_date (222, J), Jsp) from du

文档评论(0)

f8r9t5c + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档