Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim alarmDate As Date = #3/11/2010#
- Dim currentDate As Date = Date.Now
- If alarmDate.Day = currentDate.Day AndAlso alarmDate.Month = currentDate.Month Then
- 'Do Something here
- End If
- Imports System.Runtime.CompilerServices
- Module ExtensionMethods
- <Extension>
- Public Function IsSameMonthAndDayAs(d1 As Date, d2 As Date) As Boolean
- Return d1.Day = d2.Day AndAlso d1.Month = d2.Month
- End Function
- End Module
- Dim d As Date = #1/11/2010#
- If Date.Now.IsSameMonthAndDayAs(d) Then
- 'Do something here
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement