One Way:
Dim date1 As Date = CDate("8/1/2014 11:00:00 PM") Dim date2 As Date = CDate("8/1/2014 02:25:15 AM") Dim result As Boolean = date1.Date.Equals(date2.Date) 'Result: True
Second Way:
Dim date1 As Date = CDate("8/1/2014 11:00:00 PM").ToShortDateString() Dim date2 As Date = CDate("8/1/2014 02:25:15 AM").ToShortDateString() Dim result As Boolean = Date.Equals(date1, date2) 'Result: True
No comments:
Post a Comment