use xxxx DECLARE @js_address Date SET @js_address = (select Record_Date as ss1 from table_EVW where OBJECTID = 3206) SELECT DATEDIFF(second, '1970-01-01 00:00:00', @js_address)
求Record_Date的时间戳,从1970-1-1 0:0:0开始计算,计算时间差,即为时间戳
参考:https://www.cnblogs.com/jj123/p/12589559.html(sql server日期转换函数 时间戳)
DATEDIFEE()函数从名字上来看就是求两个日期的时间差,这两个日期即第二个和第三个参数,而时间差的返回格式为second,秒。
>>SQL Server里是不是时区:
>>ArcGIS Server REST时区:https://blog.csdn.net/u012839776/article/details/93681043
https://www.cnblogs.com/2008nmj/p/13848056.html
数据库加8小时返回
use database select dateadd(hour,+8,(select Record_Date as ss1 from table1_EVW where OBJECTID = 3206)) from table1_EVW where OBJECTID=3206
http://www.maomao365.com/?p=6307
https://zhidao.baidu.com/question/136495032982411005.html