R
Rob Bradford
All.
I have three variables M, D, and Y that take input from DomainUpDown
(prefix dud_) and NumericUpDown (prefix nud_). How do I cast these
into a valid date-time data type?
The DomainUPDown contains full month naes as text, eg January,
February, ect.
Dim Input_Date As Date
M = dud_Month.SelectedIndex
D = nun_Day.Value
Y = nun_Year.Value
These lines complie but fail at runtime.
Input_Date = DateValue(Dud_Month.Name + "/" + CStr(Nud_Day.Value) +
"," + CStr(Nud_Year.Value))
Input_Date = DateValue(Cstr(Y +1)+ "/" + CStr(D) + "/" + CStr(Y))
The idea is to compate the constructed date (using datediff) with
today too see if a future date has been selected.
Any suggestions would be welcome.
Rob.B
I have three variables M, D, and Y that take input from DomainUpDown
(prefix dud_) and NumericUpDown (prefix nud_). How do I cast these
into a valid date-time data type?
The DomainUPDown contains full month naes as text, eg January,
February, ect.
Dim Input_Date As Date
M = dud_Month.SelectedIndex
D = nun_Day.Value
Y = nun_Year.Value
These lines complie but fail at runtime.
Input_Date = DateValue(Dud_Month.Name + "/" + CStr(Nud_Day.Value) +
"," + CStr(Nud_Year.Value))
Input_Date = DateValue(Cstr(Y +1)+ "/" + CStr(D) + "/" + CStr(Y))
The idea is to compate the constructed date (using datediff) with
today too see if a future date has been selected.
Any suggestions would be welcome.
Rob.B