转换日期和/或时间时,SQL转换失败

时间:2017-05-02 11:00:43

标签: sql-server tsql dynamic-sql

func doubleTapped(sender:UIButton!){ // Pass sender as UIButton so you can get tag here 

   for subview in scrollView.subviews{ // Loop thorough ScrollView view hierarchy 
       if subview is UIVisualEffectView && subview.tag == sender.tag { // Check if view is type of VisualEffect and tag is equal to the view clicked
           subview.removeFromSuperview()
       }
   }
}

1 个答案:

答案 0 :(得分:0)

嘿,请尝试以下代码,看看是否有效

DECLARE @enddate datetime
DECLARE @query NVARCHAR(MAX)

SET @enddate = '02-02-2012 6:10:00:000'

SET @query = 'SELECT CONVERT(DATE,@enddate,105)'

EXEC SP_EXECUTESQL @query,N'@enddate date',@enddate