ORACLE date function 1

Source: Internet
Author: User
Tags central time zone

Sysdate [function]: returns the current date. [Parameter]: No parameter, no brackets [Return]: Date [Example] select sysdate hz from dual; return:
Last_day (d1) [function]: return the date of the last day of the month where the date d1 is located. [Parameter]: d1, date type [Return]: Date [Example] select sysdate, last_day (sysdate) hz from dual; Return: 2008-11-5,-11-30
NEW_TIME (dt1, c1, c2) [function]: returns the date and time of the time dt1 corresponds to the c2 Time Zone in the c1 time zone. [parameter]: dt1, d2 date type [Return ]: date and time [parameter]: the time zone corresponding to c1 and c2 and Its abbreviation: Atlantic Standard Time: AST or ADT Alaska _ Hawaii time: HST or hdt uk time: BST or BDT us Mountain Time: MST or mdt us Central Time Zone: CST or CDT New World Standard Time: NST us east time: EST or EDT Pacific Standard Time: PST or PDT Greenwich Mean Time: GMT Yukou Standard Time: YST or YDT [Example] select to_char (sysdate, 'yyyy. mm. dd hh24: mi: ss') bj_time, to_char (new_time (sysdate, 'pdt ', 'gmt'), 'yyyy. mm. dd hh24: mi: ss ') los_angles from dual; Return: BJ_TIME LOS_ANGLES ------------------- interval 2008.11.05 20:11:58 2008.11.06 03:11:58 [Example] select sysdate bj_time, new_time (sysdate, 'pdt ', 'gmt') los_angles from dual; Return: BJ_TIME LOS_ANGLES ------------------- --------------------- 20:11:58 03:11:58

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.