Link to home
Start Free TrialLog in
Avatar of Gary Samuels
Gary SamuelsFlag for United States of America

asked on

Working with dates

Private Sub btnAugust_Click()

Debug.Print Date
If Date < "8/1/" & (Year(Date)) Then
Debug.Print ("date is less that 8/1/" & (Year(Date)))
Else
Debug.Print ("date is greater that 8/1/" & (Year(Date)))
End If

Results:
9/13/2013
date is less that 8/1/2013

Why is 9/13/2013 less that 8/1/2013?
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial