Special oracle to_date formatting

Source: Internet
Author: User

Special formatting of oracle to_date SQL code select to_date ('mon Jan 28 11:25:58 CST 2013 ', 'dy Mon DD HH24: MI: SS "CST" YYYY') from dual if an error is prompted, if the encoding is incorrect, run the SQL code alter session set nls_date_language = 'American '; -- Obtain the select to_char (next_day (sysdate, 1) for the week where the specified date is located) -6, 'yyyy/mm/dd') aa, to_char (next_day (sysdate, 1)-6 + 6, 'yyyy/mm/dd ') bb from dual -- Obtain the Monday of the specified date. Sunday belongs to the previous week. The start day of the week is calculated as Monday. select next_day (sysdate, 'monday')-7 from dual

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.