网站大量收购独家精品文档,联系QQ:2885784924

SQL时间类型转换(国外英文资料).doc

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

SQL时间类型转换(国外英文资料) The convert of usage: Convert (the converted data type, variable/constant/field name, [transformation control parameter]) The use of the cast: Cast (variable/constant/field name, converted data type) The use of the convert Select count (*) from T_Client where convert (varchar (10), OrderTime, 120) = convert (varchar (10), getdate (), 120) The use of the cast: Cast (variable/constant/field name, converted data type) Select cast (getdate () as varchar (10)) CAST and CONVERT The expression of a data type is explicitly converted to another type of data. CAST and CONVERT provide similar functionality. grammar Use CAST: CAST AS data_type Use CONVERT: CONVERT (data_type [(length)], expression [, style]) parameter expression Any effective Microsoft? SQL Server # 8482; Expression. See the expressions for more information. data_type The data types provided by the target system, including bigint and sql_variant. You cannot use user-defined data types. For more information about available data types, see the data types. length Nchar, nvarchar, char, varchar, binary or varbinary data type optional parameters. style Date format style, so as to convert a datetime or smalldatetime data to character data (nchar, nvarchar, char, varchar, nchar or nvarchar data types). Or string format style, which will float, real, money or smallmoney data into the character data (nchar, nvarchar, char, varchar, nchar or nvarchar data types). SQL Server supports the data format in the Arabic style of the Kuwaiti algorithm. In the table, the two columns on the left represent the style values that convert datetime or smalldatetime to character data. Add 100 to the style and get the four years of the century (yyyy). So you dont have a century place. standard Input/output * * -0 or 100 (*) default values mon dd yyy: miAM (or PM) 1 101 U.S. mm/dd/yyy 2, 102, ANSI y.mm 3, 103 British/French dd/mm/yy 4 104 German dd. Mm. Yy 5105 Italian dd - mm - yy 6106 - dd mon yy 7, 107 - mon dd, yy 10

文档评论(0)

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

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

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档