Today’s Date in PL/SQL

by fwhagen Fri, 25 July 2014

Here’s the other one I forget all the time.  Although it’s much easier than T-SQL, to get today’s date in an Oracle query, use:

TRUNC(sysdate)

as in:

SELECT TRUNC(sysdate) from dual;

Remember:  Don't pass a date as a string.  Use the system variables.

Keywords:

Filed Under: DataBase | Oracle | Programming

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

TextBox

RecentPosts