Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Date to String ?
This looks like it probably belongs in a java newsgroup, not Oracle.
Also, please include the error next time.
If you want to perform this conversion in java instead of in Oracle, you might start by looking at the javadoc API for SimpleDateFormat.format(). It performs a Date to String conversion.
-Peter
"Chris" <cs123._no_spam__at_telstra.com> wrote in message news:<PGZAb.44548$aT.12946_at_news-server.bigpond.net.au>...
> "mhk" <cccssss_at_dddsssl.com> wrote in message
> news:3FD403D0.8080100_at_dddsssl.com...
> > Hi ,
> >
> > I want to convert date in to String , i am using following code but
> > getting error.
> >
> > ***************************************
> > import java.util.*;
> > public class date_finder
> > {
> > public date_finder() {}
> >
> > public String get_date ()
> > {
> >
> > Date dat = new Date();
> > String today = String.valueof(dat);
> > return (today);
> >
> > }
>
> > }
> >
> > **************************************
> >
> > Please guide me in correcting this code.
> >
> > Thanks alot for the help.
> >
> > Sincerely
> >
> > Jeff
> >
> >
> >
> select to_char(sysdate,'DD/MM/YYYY HH24:MI')
> from dual;
Received on Mon Dec 08 2003 - 13:10:36 CST