RE: Date Format using to_date

RE: Date Format using to_date

 

  

Dear Rajesh,

If you know could you please let me know the reason
why my 1st SQL is not working?

Thanks
Sami

--- "Puneyani, Rajesh" <[Email Address Removed] You can not use TO_DATE to return and display
> HH:MI:SS...TO_DATE
> Is to convert a string into a DATE format. TO_CHAR
> is the one you use to
> convert a DATE into
> A desired format. Your 2nd SQL is doing that.
>
> Regards
> Rajesh Puneyani
> Database Administrator
> ADP EBS-IT
> 973 560 2647
>
>
> -----Original Message-----
> From: Sami Seerangan [mailto:[Email Address Removed]
> Sent: Saturday, March 29, 2003 8:26 AM
> To: LazyDBA.com Discussion
> Subject: Date Format using to_date
>
>
> Hi All DBAs,
>
> Could some one explain why the following SQL is not
> returning HH:MI:SS?
>
> SQL> select to_date(sysdate,'DD-MON-YYYY HH:MI:SS')
> from dual;
>
> TO_DATE(S
> ---------
> 29-MAR-03
>
> SQL> select to_char(sysdate,'DD-MON-YYYY HH:MI:SS')
> from dual;
>
> TO_CHAR(SYSDATE,'DD-
> --------------------
> 29-MAR-2003 01:31:07
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness,
> live on your desktop!
> http://platinum.yahoo.com
>
> --------
> Oracle documentation is here:
> http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
> To unsubscribe: send a blank email to
> oracledba-[Email Address Removed] To subscribe: send a blank email to
> oracledba-[Email Address Removed] Visit the list archive:
> http://www.LAZYDBA.com/odbareadmail.pl
> Tell yer mates about http://www.farAwayJobs.com
> By using this list you agree to these
> terms:http://www.lazydba.com/legal.html
>
>


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
Oracle LazyDBA home page