Curt
April 30th, 2002, 10:48 AM
I'm using a 3rd party chart COM object (National Instruments CW graph) to plot data versus elapsed time.
The x value needs to be a VB6 equivalent Date type
which is a .NET DateTime datatype.
What I need is a way to convert a TimeSpan datatype to a DateTime datatype.
Dim testTime as System.DateTime 'date
Dim plotTime as System.DateTime 'date
Dim elapsedTime as System.TimeSpan
Dim Val1 as Double = 1
'.........
startTime = Now
'in timer event
testTime = Now
elapsedTime = System.DateTime.op_Subtraction(testTime, startTime)
Val1 = +1
'throws error
CWGraph1.Plots.Item(1).ChartXvsY(elapsedTime, Val1)
Curt
The x value needs to be a VB6 equivalent Date type
which is a .NET DateTime datatype.
What I need is a way to convert a TimeSpan datatype to a DateTime datatype.
Dim testTime as System.DateTime 'date
Dim plotTime as System.DateTime 'date
Dim elapsedTime as System.TimeSpan
Dim Val1 as Double = 1
'.........
startTime = Now
'in timer event
testTime = Now
elapsedTime = System.DateTime.op_Subtraction(testTime, startTime)
Val1 = +1
'throws error
CWGraph1.Plots.Item(1).ChartXvsY(elapsedTime, Val1)
Curt