Problems with Oracle conversion time: Ora-01810:format code appears twice

Source: Internet
Author: User

The To_date () function in Oralce is used to convert a string to a Date object:

To_date (String,  [  format_mask  ] ,  [  Nls_language   ]  

string1 the string to convert.

format_mask option, date conversion format.

nls_language options available. Specifies the NLS language used to convert strings.

Problem

Ora-01810:format Code appears twice
You might specify a date format like Java, such as:
To_date (' 2006-06-01 18:00:00 ' yyyy-mm-dd hh:MM:ss ')
The date format in Oracle is case insensitive, so mm appears two times.
The correct wording is:
To_date (' 2006-06-01 18:00:00 ' yyyy-mm-dd hh:mi:ss ')

HH--Hour of Day (1-12).
HH12--Hour of Day (1-12).
HH24--Hour of Day (0-23).
MI--Minute (0-59).
SS--Second (0-59).

The summary is that Oracle is sentimental ~

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.