0
3/25/2017
3/12-3/18
3/19-3/25
我已經使用這個SQL語句:
Select
SUBSTRING ('3/12-3/18' , 1 , CHARINDEX('-','3/12-3/18') -1) + '/' + Convert(varchar, DATEPART(yyyy,Getdate())) as StartDate,
SUBSTRING ('3/12-3/18' , CHARINDEX('-','3/12-3/18') + 1 , len('3/12-3/18')) + '/' + Convert(varchar, DATEPART(yyyy,Getdate())) as EndDate
但我不能先轉換一個