setting variable with function's result
- by zurna
I call the following function with
Call GameTimer(FormatDate(objLiveCommentary("DateFirstStarted"), "WithTime"), FormatDate(objLiveCommentary("DateSecondStarted"), "WithTime"), "Soccer")
And it prints results as 23, 35, 64, 90. I want to take this result and store it as
CurrentGameTime =
because I will save CurrentGameTime to my database. How can I do it?
Function GameTimer (FirstStarted, SecondStarted, GameType)
If GameType = "Soccer" Then
DateFirstStarted = DateDiff("n", FirstStarted, FormatDate(NOW(), "WithTime"))
DateSecondStarted = DateDiff("n", SecondStarted, FormatDate(NOW(), "WithTime"))
If DateFirstStarted <= 45 Then
Response.Write DateFirstStarted
ElseIf DateFirstStarted <= 45 Then
DateFirstStarted
ElseIf DateSecondStarted <= 45 Then
Response.Write DateSecondStarted + 45
ElseIf DateFirstStarted <= 45 Then
DateFirstStarted
Else
Response.Write "90"
End If
End If
End Function