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
Printable View
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
select to_char(sysdate, 'dd-mon-yyyy hh:miAM') from dual
or
select to_char(sysdate, 'dd-mon-yyyy hh24:mi') from dual
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