如何使用日期时间戳将 SQL 时间转换为毫秒。我正在使用 VB.Net 做一个 highstock 图表
这是我到目前为止的选择代码
Dim mydatalist As New List(Of XyData)
Dim sqlReader As SqlDataReader
Dim strConn As New SqlConnection(ConfigurationManager.ConnectionStrings("myCipConnection").ConnectionString)
Dim strSql As String = "SELECT TOP 1000 DATEDIFF(second,{d '1970-01- 01'},dtmStamp)AS dtmStamp ,dblReturnTemp FROM tblCIPEventData "
Dim sqlCmd As New SqlCommand(strSql, strConn)
strConn.Open()
sqlReader = sqlCmd.ExecuteReader
我有一个 SQL 选择
Dim strSql As String = "SELECT TOP 1 dtmStamp ,dblReturnTemp FROM tblCIPEventData"
结果看起来像
2009-10-22 11:29:31.513
如何将其转换为毫秒