Ver Mensaje Individual
  #5 (permalink)  
Antiguo 13/12/2008, 15:19
cristipisti
 
Fecha de Ingreso: noviembre-2008
Mensajes: 14
Antigüedad: 15 años, 5 meses
Puntos: 0
Respuesta: Comparacion fechas!!!!!!

Al final he hecho ésto para comparar:

SqlDataAdapter daA = new SqlDataAdapter("Select top 1 * From Aperturas where FechaApertura = @Hoy", conCierre);
daA.SelectCommand.Parameters.AddWithValue("@Hoy",D ateTime.Now.ToLongDateString());

Por otro lado en la tabla Aperturas guardo el valor de fecha así:
drAp["FechaApertura"] = dateTimePicker1.Value.ToLongDateString();
La fecha se guarda en la tabla así: 13/12/2008 0:00:00


Y me sale el siguiente error.

Conversion failed when converting datetime from character string.


¡¡No sé qué más probar!!!!