我有列的表:
ID(int), Ano(varchar), Bno(varchar), StartTime(DateTime), EndTime(DateTime)
此 SQL 查询的等效 LINQ 语句是什么:
SELECT
StartTime, EndTime, Ano, Bno,
datediff(s, StartTime, EndTime) as duration
FROM
TABLENAME
where
StartTime >= 'value Input by user'
and StartTime <= 'value INPUT by user'
order by
StartTime desc
在这里,我如何选择将值转换为分钟的持续时间。以分钟和秒为单位计算所有记录的总持续时间