Date Format

Raddy

Member
Joined
Nov 17, 2006
Messages
5
Programming Experience
1-3
I'm attempting to get my program to recognize certain holidays (New Years, Thanksgiving, Christmas, etc.) and display an according picture. I can get it to recognize the dates, but I want it to work for the date, regardless of the year. I tried entering:
VB.NET:
If today = #12/25/****# Then
     picHoliday.image = xmas.image
End If
and it threw an error saying the date wasn't a valid date.
 
Could use:

VB.NET:
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] Now.Day = 25 [/SIZE][SIZE=2][COLOR=#0000ff]And[/COLOR][/SIZE][SIZE=2] Now.Month = 12 [/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
 
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
 
Back
Top