Date only comparison on date types

Category VB.Net Sub Category Manipulating Types
Bookmark and Share
Compare just the date part of a date object ignoring the time
Copy Code
Dim dateApproved As Date If IsDate(txtApprovalDate.Text) Then dateApproved = DateTime.Parse(txtApprovalDate.Text) If dateApproved.Date < Now.Date Then 'do something End If
Share the love
Bookmark and Share