如何将持续时间加倍转换为时间? [英] How can i convert duration in double to Time?
本文介绍了如何将持续时间加倍转换为时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将double转换为时间,即持续时间以double转换为time.对于持续时间为160.00的视频播放.我需要得到这个有价值的时间条款.这部影片需要多少时间?
Hi,
How is it possible to convert double to time i.e. the duration in double to time. For video plays for a duration of 160.00. I need to get this value terms of time. How much time does this video take?
推荐答案
试试看
TimeSpan span = TimeSpan.FromSeconds(double);
如果可以将值存储为long
,则可以使用DateTime dt = new DateTime(value);
,其中value是long
值.
If you can store your value aslong
, you can useDateTime dt = new DateTime(value);
where value is thelong
value.
这个双精度值是什么意思,是秒??
Hi,
What do you mean by this double value, is it seconds??
这篇关于如何将持续时间加倍转换为时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文