Oracle Date Format

Source: Internet
Author: User
Insert into ecp_chat_message (chatid, content, imgurl, senduserid, sendtime, receiveuserid, state, isread)
Values
(1, 'asdfdf', 'aaa', 'kehu4', to_date ('2017-12-03 12:55:45. 333333 ', 'yyyy-mm-dd hh24: MI: Ss. FF '), 'serviceid', 1, 0)

The following error is reported:

The Date Format Image ends before the entire input string is converted.

You can insert data to the second in this way,

Insert into ecp_chat_message (chatid, content, imgurl, senduserid, sendtime, receiveuserid, state, isread)
Values
(1, 'asdfdf', 'aaa', 'kehu4', to_date ('2017-12-03 12:55:45 ', 'yyyy-mm-dd hh24: MI: ss '), 'serviceid', 1, 0)

Use in milliseconds

Insert into ecp_chat_message (chatid, content, imgurl, senduserid, sendtime, receiveuserid, state, isread)
Values
(1, 'asdfdf', 'aaa', 'kehu4', to_timestamp ('2017-12-03 12:55:45. 333333 ', 'yyyy-mm-dd hh24: MI: Ss. FF '), 'serviceid', 1, 0)

Note that the database field must be changed to the timestamp type.

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.