DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: displaying time

Hybrid View

  1. #1
    Join Date
    Dec 2000
    Posts
    255
    Hi all

    I want to display the time with am and pm in it for sysdate.
    Currently I am using "select to_char(sysdate,'hh:mi') from dual' which displays me hour and minutes but not the AM and PM . Can anyone let me know this ?

    Amol


  2. #2
    Join Date
    Oct 2000
    Posts
    467
    select to_char(sysdate, 'dd-mon-yyyy hh:miAM') from dual
    or
    select to_char(sysdate, 'dd-mon-yyyy hh24:mi') from dual
    Vinit

  3. #3
    Join Date
    Oct 2001
    Posts
    83

    More information

    Hello,

    You can have more information about fomatting date by taking a look in the chapter 2 of ORACLE [7|8] SQL REFERENCE (section : DATE FORMAT ELEMENTS)

    Hope this helps



Posting Permissions

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


Click Here to Expand Forum to Full Width