oracle中tochar的用法

oracle中tochar的用法

ID:34724952

大小:69.18 KB

页数:5页

时间:2019-03-10

oracle中tochar的用法_第1页
oracle中tochar的用法_第2页
oracle中tochar的用法_第3页
oracle中tochar的用法_第4页
oracle中tochar的用法_第5页
资源描述:

《oracle中tochar的用法》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、Thefollowingarenumberexamplesfortheto_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'  Thefollowingisalistofvalidparameterswhenthet

2、o_charfunctionisusedtoconvertadatetoastring.Theseparameterscanbeusedinmanycombinations.  ParameterExplanation  YEARYear,spelledout  YYYY4-digityear  YYY  YY  YLast3,2,or1digit(s)ofyear.  IYY  IY  ILast3,2,or1digit(s)ofISOyear.  IYYY4-digityearbasedontheISOstandard  QQuarterofyear(1,2,3

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

4、tsonthefirstdayofthemonthandendsontheseventh.  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). 

5、 HH24Hourofday(0-23).  MIMinute(0-59).  SSSecond(0-59).  SSSSSSecondspastmidnight(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

6、(sysdate,'FMMonthDD,YYYY');wouldreturn'July9,2003'  to_char(sysdate,'MONDDth,YYYY');wouldreturn'JUL09TH,2003'  to_char(sysdate,'FMMONDDth,YYYY');wouldreturn'JUL9TH,2003'  to_char(sysdate,'FMMonddth,YYYY');wouldreturn'Jul9th,2003'  Youwillnoticethatinsomeexamples,theformat_maskparameter

7、beginswith"FM".Thismeansthatzerosandblanksaresuppressed.Thiscanbeseenintheexamplesbelow.  to_char(sysdate,'FMMonthDD,YYYY');wouldreturn'July9,2003'  to_char(sysdate,'FMMONDDth,YYYY');wouldreturn'JUL9TH,2003'  to_char(sysdate,'FMMonddth,YYYY');wouldreturn'Jul9th,2003'  Thezeroshavebee

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

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

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