我试图在BIDS中复制此SQL代码(Business Intelligence Development Studio 2008)
CONVERT(TIME,DATEADD(MS,ROUND(AVG(CAST(MYSECONDFIELD AS DECIMAL)*1000), 2),'00:00:00')) [HH:MM:SS:FFF]
到目前为止,我已经得到了以下内容;
=FORMAT(DATEADD("MS",ROUND(AVG(CDec(Fields!MySecondField.Value))*1000,2),"00:00:00:000"), "HH:mm:ss:fff")
然而,它似乎在DATEADD函数中出错并且它必须在BIDS中但我可以在SQL中格式化该字段,我想知道是否有更简单的方法来执行此操作,