PopupDateField to sqlserver smalldatime

how I can convert a Date to insert into a table in sqlserver smalldatetime
I have this:

private PopupDateField fechaSolicitud;

fechaSolicitud.setValue(new Date());

after I capture what:
Date feSa = fechaSalidaDateField.getValue();
and brings me the value in the following format
FechaSalidaPrevista: Fri Oct 31 13:15:43 ART 2014
and I need to come out in the following format
yyyy-MM-dd 00:00:00

setDateFormat will only format the DateField component’s displayed value (as far as I know). You’ll have to format the java.util.Date string yourself. Perhaps this will help?

works perfect, thanks

  This is the converter

    String res_feSa;
    String res_feSo;
    SimpleDateFormat formatter;
    //formato correcto 2013-09-08 00:00:00
    formatter = new SimpleDateFormat("yyyy-MM-dd 00:00:00");
    res_feSa = formatter.format(feSa);
    res_feSo = formatter.format(feSo);