Oracle Common Functions Introduction

Source: Internet
Author: User
Tags mathematical functions

Character functions

Mathematical functions

Date function

Conversion functions

To_char (number/date) is the conversion of a date or number to a string

  • Convert a number to a specified format
  • To_char (1210.73,'9999.9')--would return ' 1210.7 'To_char (1210.73,'9,999.99')--would return ' 1,210.73 'To_char (1210.73,'$9,999.00')--would return ' $1,210.73 'To_char ( +,'000099')--would return ' 000021 '
  • Convert a date to a specified format
  • To_char (Sysdate,'YYYY/MM/DD');--would return ' 2003/07/09 'SelectTo_char (Sysdate,'YYYY-MM-DD Hh24:mi:ss') fromA------> 2015-08-28 14:43:15SelectTo_char (Sysdate,'YYYY-MM-DD Hh12:mi:ss') fromA------> 2015-08-28 02:43:15To_char (Sysdate,'YYYY/MM/DD');--would return ' 2003/07/09 'To_char (Sysdate,'dd-mm-yyyy')--convert 23-05-2016 by dd-mm-yyyy formatTo_char (Sysdate,'Month DD, YYYY');--would return ' OctoberTo_char (Sysdate,'fmmonth DD, YYYY');--would return ' July 9, 2003 'To_char (Sysdate,'MON ddth, YYYY');--would return ' JUL 09TH, 2003 'To_char (Sysdate,'Fmmon ddth, YYYY');--would return ' JUL 9TH, 2003 'To_char (Sysdate,'Fmmon ddth, YYYY');--would return ' Jul 9th, 2003 'To_char (Sysdate,'fmmonth DD, YYYY');--would return ' July 9, 2003 'To_char (Sysdate,'Fmmon ddth, YYYY');--would return ' JUL 9TH, 2003 'To_char (Sysdate,'Fmmon ddth, YYYY');--would return ' Jul 9th, 2003 '

To_number (String) converts the given character to a number

Select to_number ('123' from A;  
General functions

Oracle Common Functions Introduction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.