How to Check if the Date is in DayLightSaving Range using VB.NET
VB.NET’s DAteTime function can be used to give the same output VBA’s DateSerial function
Sub GetDate()
Dim MyDate As DateTime
MyDate = New DateTime(2008, 8, 15)
MsgBox(DateSerial(2008, 8, 15))
If MyDate.IsDaylightSavingTime() = True Then
MsgBox("Specified day is within daylightsaving time")
End If
End Sub
No comments:
Post a Comment