String newStr = "2008-09-10 23:10:00";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
java.util.Date DATE = new Date();
try {
            DATE = (java.util.Date) sdf.parse(newStr);
} catch (ParseException ex) {
           Logger.getLogger(processor.class.getName()).log(Level.SEVERE,
null, ex);
}

2008/10/13 irfani YangBaikHati <[EMAIL PROTECTED]>

>   saiful_haqqi wrote:
> > kalo di PHP ada fungsi seperti ini
> >
> > $thn = 2008;
> > $bln = 9;
> > $tgl = 1;
> > $hasil = sprintf ("%04d-%02d-%02d", $tahun, $bulan, $tanggal);
> >
> > output: $hasil -> 2008-09-01
> >
> > kalo di java gmn yach ... ?!
> >
> >
> >
> -Formatter class
> -String.format
>
> --
> irfani
>
> http://irfani.web.id
> Y! irfani_s
>
>  
>



-- 
Salam,


Yogi Eka.

Kirim email ke