Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2013
    Posts
    20

    Question Unanswered: get hour value from sysdate in 24 hour format

    Hi all,

    How do I get hour value from sysdate in 24 hour format (the result should be only number, not varchar value) ?


    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    "CORE 11.2.0.1.0 Production"
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production

  2. #2
    Join Date
    Sep 2013
    Posts
    20

    Smile

    the solution:

    select to_number(to_char(sysdate,'HH24')) from dual;

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •