mushin
Programmer
- Oct 4, 2000
- 49
I'm a bit new to .Net and am perplexed by some unwarranted
complexity.
dim d as datetime
dim dur as int
d = datetimepickr1.value.
datetimepicker2.value = d.addminutes(30).
This works ok, but now I want to use the contents on myField
in place of the hard coded value of 30.
I have a db field (myField) of type INT.
On my Screen I display myField.text.
When I change the value a calculation occurs with a date.
datetimepicker2.value = d.addminutes(myField).
I have tried to convert myField to an int but the calc still
protests.
dim Dur as int32
dur = convert.toint32(myField.text)
datetimepicker2.value = d.addminutes(myField).
error *** "input string was not in correct format"
I tried this as a 'double' to no avail.......
What gives ? Anyone ?
complexity.
dim d as datetime
dim dur as int
d = datetimepickr1.value.
datetimepicker2.value = d.addminutes(30).
This works ok, but now I want to use the contents on myField
in place of the hard coded value of 30.
I have a db field (myField) of type INT.
On my Screen I display myField.text.
When I change the value a calculation occurs with a date.
datetimepicker2.value = d.addminutes(myField).
I have tried to convert myField to an int but the calc still
protests.
dim Dur as int32
dur = convert.toint32(myField.text)
datetimepicker2.value = d.addminutes(myField).
error *** "input string was not in correct format"
I tried this as a 'double' to no avail.......
What gives ? Anyone ?