Ver Mensaje Individual
  #4 (permalink)  
Antiguo 13/01/2010, 19:54
AAvila_
 
Fecha de Ingreso: septiembre-2009
Mensajes: 49
Antigüedad: 14 años, 7 meses
Puntos: 0
Respuesta: Comparar Datetime para saber si es el mismo dia solo en c#

Cita:
Iniciado por kitune Ver Mensaje
Pero supongamos estas fechas que pongo yo, y tiene que dar TRUE igualmente:

sería solo complementar lo anterior

Código vb:
Ver original
  1. Public Class Form1
  2.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  3.         Dim i As DateTime = "10/12/2008 10:10:10"
  4.         Dim a As DateTime = "10/12/2008 13:05:44"
  5.  
  6.         If (i.Day == a.Day and i.Month==a.Month and i.Year == a.Year) then
  7.              return true
  8.         end if
  9.     End Sub
  10. End Class