
29/04/2010, 14:42
|
| | Fecha de Ingreso: mayo-2009
Mensajes: 57
Antigüedad: 15 años, 9 meses Puntos: 0 | |
Respuesta: Inicializar datetimepicker a una fecha dada Este es el código:
Código:
'Ejecuto la consulta
sql = "SELECT * FROM cita WHERE idcita = " & cbIdCita.Text & " "
comandoBD = New MySqlCommand(sql, conexionBD)
conexionBD.Open()
lector = comandoBD.ExecuteReader()
'Rellenamos los textbox
If lector.Read Then
'Introduzco la fecha
tbFecha.Format = DateTimePickerFormat.Custom
tbFecha.CustomFormat = lector.Item("fecha")
'Introduzco nombre, descripcion y hora
tbNombre.Text = lector.Item("nombre") : tbDescripcion.Text = lector.Item("descripcion") : tbHora.Text = lector.Item("hora")
End If
|