Creating a short date based on the day of month
I know there must be a simple way to do this but it is eluding me so far. I want to create a short date based on a number entered into a text box. If, for instance, a 12 is entered I would like it to set the default date to 1/12/2004 (current month)
Basicaly I want to do the opposite of this sub that I found in Help
VB Code:
Dim MyDate As Date
Dim MyDay As Integer
MyDate = _
#2/12/1969# ' Assign a date using standard short format.
MyDay = _
Microsoft.VisualBasic.DateAndTime.Day(MyDate) ' MyDay contains 12.