sql日期格式(国外英文资料).doc

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

sql日期格式(国外英文资料) Key word: sqlserver date, string format conversion What? SELECT? Convert (char, your date field, 120)? As? Date2? FROM? Table? MSSQL defaults to output in system time format, and you can adjust the systems time format to resolve it Of course, in the program to solve more flexible, convert (char, date, N) output in each of the styles N? Date style? 0? 04? 2? 2005? 9:06AM? 1? 04/02/05?? 2? 05.04.02?? 3? 02/04/05?? 4? 02.04.05?? 5? 02-04-05?? 6? 02? 04? 05? 7? 04? 02? 05? 8? 09:06:18?? 9? 04? 2? 2005? 9:06:18:857AM? 10? 04-02-05?? 11? 05/04/02?? 12? 050402? 13? 02? 04? 2005? 09:06:18:857? 14? 09:06:18:857?? 20? 2005-04-02? 09:06:18?? 21? 2005-04-02? 09:06:18.857?? 22? 04/02/05? 9:06:18? AM? 23? 2005-04-02?? 24? 09:06:18?? 25? 2005-04-02? 09:06:18.857?? 100? 04? 2? 2005? 9:06AM? 101? 04/02/2005?? 102? 2005.04.02?? 103? 02/04/2005?? 104? 02.04.2005?? 105? 02-04-2005?? 106? 02? 04? 2005? 107? 04? 02? 2005? 108? 09:06:18?? 109? 04? 2? 2005? 9:06:18:857AM? 110? 04-02-2005?? 111? 2005/04/02?? 112? 113? 02? 04? 2005? 09:06:18:857? 114? 09:06:18:857?? 120? 2005-04-02? 09:06:18?? 121? 2005-04-02? 09:06:18.857?? 126? 2005-04-02T09:06:18.857? SQL to_char date conversion string 2009-04-27 12:24 1, conversion function The most important thing to do with the date operation is the two translation function: to_date (), to_char () To_date () acts to convert character types into a date type 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, note that the front and back should be one-to-one correspondence. For example, to_date (2004-11-27, 13:34:43,yyyy-mm-dd, hh24:mi:ss) will get the exact time Multiple date formats: YYYY: the year in which the four bit represents YYY, YY, Y: the last three, two or one of the year, default to the current century MM:01~12s month number MONTH: nine characters representing the month, and the right side is filled with spaces MON: abbreviation for t

您可能关注的文档

文档评论(0)

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

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

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档