hey guys..i've got this task to work on..
what i am suppose to do here is - get the openDate(when the ticket was created) and the resolveDate(when the ticket issue was solved) from the database
and use this formula - TurnAroundTime = ResolveDate - OpenDate
my report UI consist of a texbox where u can search for the ticketID and get the data..
the data displayed will be the openDate and the ResolveDate..
with this 2 records, i want to get the turnaround time so i have another button which is calculate
when i click on calculate i want the system to use the formula to get the TurnAroundTime..
so behind my button i have this code:
and i have called the CalCulateTurnArndTime function at my tickets class which is this:Code:Protected Sub btnCalculateTurnArnd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalculateTurnArnd.Click Dim clsTickets_Obj As New clsTickets Dim Time As Double = 0.0 Time = clsTickets_Obj.CalculateTurnArndTime(Convert.ToString(ID)) End Sub End Class
but i cant get it to work..i get the error "Input string was not in correct format" at the line Time = clsTickets_Obj.CalculateTurnArndTime(Convert.ToString(ID))Code:Public Function CalculateTurnArndTime(ByVal ID As Integer) As Integer Dim TurnArndTime As Double TurnArndTime = ResolveDate - OpenDate Return TurnArndTime End Function
anybody help me pls..thanx!




Reply With Quote