我有一个查询,以小时,分钟为单位显示停机时间,但需要以天,小时,分钟为单位显示,也许还有另一个显示天,小时为单位的查询
抱歉,我不擅长编码。
${SQL: SELECT CAST( CAST(('${N=Alerting;M=Downtime}') AS int) / 60 AS varchar) + ' hours ' + right('0' + CAST(CAST(('${N=Alerting;M=Downtime}') AS int) % 60 AS varchar(2)),2) + ' minutes'}
答案 0 :(得分:0)
${SQL: SELECT CAST( CAST(('${N=Alerting;M=Downtime}') AS int) / 1440 AS varchar) + ' days ' + right('0' + CAST(CAST(('${N=Alerting;M=Downtime}') AS int) % 1440 / 60 AS varchar(2)),2) + ' hours ' + right('0' + CAST(CAST(('${N=Alerting;M=Downtime}') AS int) % 60 AS varchar(2)),2) + ' minutes'}