问题描述:

Let's say i am importing a time from sql with

<input type="hidden" name="dte_assignment" id="dte_assingment" runat="server" />

i want to get the difference in time from the sql time to the current time. How would i do that?

I need to get the time so that if it goes over 24 hours something is blocked.

Thanks

网友答案:
Dim difference As System.TimeSpan = DateTime.Now.Subtract(yourTime)
If difference.TotalHours > 24 Then
   ' block something
End If
相关阅读:
Top