oracletochar函数详解

oracletochar函数详解

ID:34724926

大小:105.18 KB

页数:5页

时间:2019-03-10

oracletochar函数详解_第1页
oracletochar函数详解_第2页
oracletochar函数详解_第3页
oracletochar函数详解_第4页
oracletochar函数详解_第5页
资源描述:

《oracletochar函数详解》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、ORACLEto_char函数详解2007年07月04日星期三下午05:41Thefollowingarenumberexamplesfortheto_charfunction.to_char(1210.73,'9999.9')wouldreturn'1210.7'to_char(1210.73,'9,999.99')wouldreturn'1,210.73'to_char(1210.73,'$9,999.00')wouldreturn'$1,210.73'to_char(21,'000099')wouldreturn'000021'Thefollowingisalistofvalid

2、parameterswhentheto_charfunctionisusedtoconvertadatetoastring.Theseparameterscanbeusedinmanycombinations.   ParameterExplanationYEARYear,spelledoutYYYY4-digityearYYYYYYLast3,2,or1digit(s)ofyear.IYYIYILast3,2,or1digit(s)ofISOyear.IYYY4-digityearbasedontheISOstandardQQuarterofyear(1,2,3,4;JAN-MAR=

3、1).MMMonth(01-12;JAN=01).MONAbbreviatednameofmonth.MONTHNameofmonth,paddedwithblankstolengthof9characters.RMRomannumeralmonth(I-XII;JAN=I).WWWeekofyear(1-53)whereweek1startsonthefirstdayoftheyearandcontinuestotheseventhdayoftheyear.WWeekofmonth(1-5)whereweek1startsonthefirstdayofthemonthandendso

4、ntheseventh.IWWeekofyear(1-52or1-53)basedontheISOstandard.DDayofweek(1-7).DAYNameofday.DDDayofmonth(1-31).DDDDayofyear(1-366).DYAbbreviatednameofday.JJulianday;thenumberofdayssinceJanuary1,4712BC.HHHourofday(1-12).HH12Hourofday(1-12).HH24Hourofday(0-23).MIMinute(0-59).SSSecond(0-59).SSSSSSeconds

5、pastmidnight(0-86399).FFFractionalseconds.Thefollowingaredateexamplesfortheto_charfunction.to_char(sysdate,'yyyy/mm/dd');wouldreturn'2003/07/09'to_char(sysdate,'MonthDD,YYYY');wouldreturn'July09,2003'to_char(sysdate,'FMMonthDD,YYYY');wouldreturn'July9,2003'to_char(sysdate,'MONDDth,YYYY');wouldre

6、turn'JUL09TH,2003'to_char(sysdate,'FMMONDDth,YYYY');wouldreturn'JUL9TH,2003'to_char(sysdate,'FMMonddth,YYYY');wouldreturn'Jul9th,2003'Youwillnoticethatinsomeexamples,theformat_maskparameterbeginswith"FM".Thismeansthatzerosandblanksaresuppressed.Thiscanbeseenintheexamplesbelow.to_char(sysdate,'FM

7、MonthDD,YYYY');wouldreturn'July9,2003'to_char(sysdate,'FMMONDDth,YYYY');wouldreturn'JUL9TH,2003'to_char(sysdate,'FMMonddth,YYYY');wouldreturn'Jul9th,2003'Thezeroshavebeensuppressedsothatthedaycomponentshowsas"9"asopposedto"0

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。