PLSQL | CURRENT_DATE Function Last Updated : 24 Oct, 2019 Comments Improve Suggest changes Like Article Like Report The PLSQL CURRENT_DATE function is used to return the current date in the session time zone. The time zone used is the time zone of the current SQL session as set by the ALTER SESSION command. The PLSQL CURRENT_DATE function uses its value from the Gregorian calendar of datatype DATE. The CURRENT_DATE function accepts no parameters. Syntax: CURRENT_DATE Parameters Used: The CURRENT_DATE function accepts no parameters. Return Value: The CURRENT_DATE function returns a date value. Supported Versions of Oracle/PLSQL: Oracle 12c Oracle 11g Oracle 10g Oracle 9i Oracle 8i Example-1: Using the SESSIONTIMEZONE function to find the session time zone. ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS'; SELECT SESSIONTIMEZONE FROM DUAL; Output: Session altered. SESSIONTIMEZONE +00:00 Example-2: Using the CURRENT_DATE function to get the current date in the session time zone. ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS'; SELECT SESSIONTIMEZONE FROM DUAL; SELECT CURRENT_DATE FROM DUAL; Output: Session altered. SESSIONTIMEZONE +00:00 CURRENT_DATE 22-OCT-2019 06:53:58 Example-3: Using the CURRENT_DATE function after altering the session time zone to get the current date. ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS'; SELECT SESSIONTIMEZONE FROM DUAL; ALTER SESSION SET TIME_ZONE = '-02:00'; SELECT CURRENT_DATE FROM DUAL; Output: Session altered. SESSIONTIMEZONE +00:00 Session altered. CURRENT_DATE 22-OCT-2019 05:05:36 The new current date was adjusted about -2 hours as expected. Comment More infoAdvertise with us Next Article PLSQL | CURRENT_DATE Function S Shubrodeep Banerjee Follow Improve Article Tags : SQL SQL-PL/SQL Similar Reads CURRENT_DATE() Function in MySQL In this article, you will see how you can use the current_date function and you will see both formats in the string and numeric respectively. CURRENT_DATE : In this function, you will see how you can use the current date function. In MSQSSL, format of date 'âYYYY-MM-DDâ(in string) format or YYYYMMDD 1 min read PLSQL | EXTRACT Function The PLSQL EXTRACT function is used for extracting a specific value such as year, month, day or hour from a date or an interval value. Syntax: EXTRACT(field FROM source) Parameters Used: The EXTRACT function accepts two parameters : field - It is used to specify the component that needs to be extract 2 min read CURDATE() Function in MySQL The CURDATE() function in MYSQL is used to return the current date. The date is returned to the format of "YYYY-MM-DD" (string) or as YYYYMMDD (numeric). This function equals the CURRENT_DATE() function. In this article, we are going to discuss about CURDATE() function in detail. Syntax CURDATE(); P 2 min read PLSQL | CURRENT_TIMESTAMP Function The PLSQL CURRENT_TIMESTAMP function is used to return the current date and time in session time zone. The time zone used is the time zone of the current SQL session as set by the ALTER SESSION command. The CURRENT_TIMESTAMP function returns a value of TIMESTAMP WITH TIME ZONE while the CURRENT_DATE 2 min read SQL | Date Functions (Set-1) SQL Date Functions are essential for managing and manipulating date and time values in SQL databases. They provide tools to perform operations such as calculating date differences, retrieving current dates and times and formatting dates. From tracking sales trends to calculating project deadlines, w 5 min read SQL | Date Functions (Set-2) SQL Date Functions are powerful tools that allow users to manipulate, extract , and format date and time values within SQL databases. These functions simplify handling temporal data, making them indispensable for tasks like calculating intervals, extracting year or month values, and formatting dates 5 min read CURRENT_TIME() function in MySQL In MySQL, the CURRENT_TIME() function is a valuable tool for retrieving the current system time from the server, providing the exact time in hours, minutes, and seconds. It is widely used in scenarios where tracking or querying the current time is essential without needing the full date. In this art 3 min read Date and Time Functions in PL/SQL Date and Time Functions in PL/SQL are useful for date and time operations like extracting date components, performing date arithmetic, and converting between date formats. Date and Time Functions in PL/SQLThere are many useful Date and Time functions in PL/SQL. A table of such functions along with t 4 min read MySQL | CAST( ) Function The MySQL CAST() function is used for converting a value from one datatype to another specific datatype. The CAST() function accepts two parameters which are the value to be converted and the datatype to which the value needs to be converted. The datatypes in which a given value can be converted are 3 min read CURTIME() function in MySQL CURTIME() function in MySQL is used to check the current time. It returns the current time as a value in âhh:mm:ssâ or 'hhmmss' format, depending on whether the function is used in a string or numeric context. Syntax : CURTIME(fsp) Parameters : This method accepts only one parameter. fsp - It specif 2 min read Like