方法一:
Dim NowDate As DateTime = System.DateTime.Now
Dim OleDate As DateTime = CObj("01/01/1970 08:00:00")
Dim nDay As TimeSpan = NowDate.Subtract(OleDate)
TimeInt= CInt(nDay.TotalSeconds)
方法二:
TimeInt = (System.DateTime.Now - CDate("01/01/1970 08:00:00")).TotalSeconds
方法三
TimeInt = CStr(DateDiff(Microsoft.VisualBasic.DateInterval.Second,CDate("01/01/1970 08:00:00"),Now)) '邮戳
原文链接:https://www.f2er.com/vb/258709.html