将SQL查询结果转换为Datetime - 语法不正确

时间:2017-03-08 15:49:10

标签: sql type-conversion sql-convert

我想将此查询的结果(字符串转换为DateTime)

SET [something] = dbo.fn_GetProfileElement('WelcomeSent',PropertyNames,PropertyValuesString)
FROM aspnet_Profile where  aspnet_Profile.UserId = CTUsers.userid

所以我试试这个:

SET [something] = CONVERT(DATETIME,(dbo.fn_GetProfileElement('WelcomeSent',PropertyNames,PropertyValuesString)
    FROM aspnet_Profile where  aspnet_Profile.UserId = CTUsers.userid),101)

但是我收到了这个错误:

  

关键字'FROM'附近的语法不正确。

0 个答案:

没有答案