Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to display date and time from 'Select Sysdate...'
Use the to_char() function:
select to_char(sysdate,'DD-MON-YY HH:MI') from dual;
I'm not sure what the format mask is for the AM/PM part. Look it up in you SQL Language book.
Roy Klassen rklassen_at_pei.sympatico.ca
JYF 3 <jyf3_at_aol.com> wrote in article
<19970802191800.PAA13226_at_ladder02.news.aol.com>...
> Hi, Helper :
> My target is to display system date and time at same time.
> I can do this on MSSQL Server without any problems.
> But, I can't do it on ORACLE with sentence like this:
> SELECT SYSDATE FROM DUAL;
> unexpected output
> 01-AUG-97
> expected output
> 01-AUG-97 12:35AM.
>
> If you know how to change system default datetime format, please give me
a
> help.
> Thanks !
> JYF3
>
>
>
>
>
Received on Sun Aug 03 1997 - 00:00:00 CDT
![]() |
![]() |