N
News
Hi
I am using Visual Basic v5 Express (fully up-to-date for Vista), running on
a Vista machine.
I am having a terrible time trying to get to grips with DateTime use in VB.
I have tried countless code snippets as a starting point, but in *all*
cases, the code just bombs.
As an example, I copied the snippet below from a Microsoft page which is
supposed to show an example of 'fixing'
some bad code given in the example prior to it - yet with me, it just plain
doesn't work.
The most common error I get from most of my trials, and with the example
below is:
'Index was outside the bounds of the array'.
Example snippet:
Dim d As DateTime
d = DateTime.Parse("Dec 03, 2003 12:00:00 PM").ToUniversalTime()
I just can't find an example that actually works on my system that allows me
to use a string representation of a Date and Time that I can use in code.
There isn't anything wrong with my system as many other VB programs run just
fine.
I am using Visual Basic v5 Express (fully up-to-date for Vista), running on
a Vista machine.
I am having a terrible time trying to get to grips with DateTime use in VB.
I have tried countless code snippets as a starting point, but in *all*
cases, the code just bombs.
As an example, I copied the snippet below from a Microsoft page which is
supposed to show an example of 'fixing'
some bad code given in the example prior to it - yet with me, it just plain
doesn't work.
The most common error I get from most of my trials, and with the example
below is:
'Index was outside the bounds of the array'.
Example snippet:
Dim d As DateTime
d = DateTime.Parse("Dec 03, 2003 12:00:00 PM").ToUniversalTime()
I just can't find an example that actually works on my system that allows me
to use a string representation of a Date and Time that I can use in code.
There isn't anything wrong with my system as many other VB programs run just
fine.