BabyAngel
April 14th, 2009, 07:56 PM
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:
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
and i have called the CalCulateTurnArndTime function at my tickets class which is this:
Public Function CalculateTurnArndTime(ByVal ID As Integer) As Integer
Dim TurnArndTime As Double
TurnArndTime = ResolveDate - OpenDate
Return TurnArndTime
End Function
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))
anybody help me pls..thanx!
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:
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
and i have called the CalCulateTurnArndTime function at my tickets class which is this:
Public Function CalculateTurnArndTime(ByVal ID As Integer) As Integer
Dim TurnArndTime As Double
TurnArndTime = ResolveDate - OpenDate
Return TurnArndTime
End Function
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))
anybody help me pls..thanx!