Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Date to String ?

Re: Date to String ?

From: Peter Connolly <peter_at_alum.wpi.edu>
Date: 8 Dec 2003 11:10:36 -0800
Message-ID: <39fde041.0312081110.419deef@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US