Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 将Excel的时间值导入SQL Server_Sql Server_Excel Formula - Fatal编程技术网

Sql server 将Excel的时间值导入SQL Server

Sql server 将Excel的时间值导入SQL Server,sql-server,excel-formula,Sql Server,Excel Formula,在Excel中,我们有TimeValue函数,例如:TimeValue(“5:12:00AM”)将返回0.21666667 现在,我有了员工的进入时间(7:10),我想将这些时间作为时间值保存到SQL Server中 有人能帮我吗 Select Cast(0.216666667 as dateTime) Select Cast(Cast('5:12' as dateTime) as Float) Select Cast(Cast('7:10' as dateTime) as Float)

在Excel中,我们有TimeValue函数,例如:TimeValue(“5:12:00AM”)将返回0.21666667

现在,我有了员工的进入时间(7:10),我想将这些时间作为时间值保存到SQL Server中

有人能帮我吗

Select Cast(0.216666667 as dateTime)


Select Cast(Cast('5:12' as dateTime) as Float)
Select Cast(Cast('7:10' as dateTime) as Float)