1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

getdate()

Discussion in 'SQL PL/SQL' started by monkey, Jun 3, 2014.

  1. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    Please, is that command usable in oracle, and what does it do acutally?
    many thanks!
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    No, it's not used in Oracle. Oracle provides a pseudo-column named SYSDATE to return the current date/time values:


    SQL> select sysdate from dual;


    SYSDATE
    ---------
    03-JUN-14


    SQL>


    Depending on how you have the date format set you may see the date as shown above or you may see it complete with time:


    SQL> alter session set nls_date_Format='DD-MON-RRRR HH24:MI:SS';



    Session altered.


    SQL> select sysdate from dual;


    SYSDATE
    ---------------------
    03-JUN-2014 07:47:45


    SQL>
     
  3. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    What is pseudocolumn?
     
  4. rajenb

    rajenb Forum Expert

    Messages:
    361
    Likes Received:
    114
    Trophy Points:
    655
    Location:
    Mauritius