2017-12-27 111 views
-4

我发送TimeSpan对象称为时间从后端到前端。如何正确显示客户端的时间?

以下类型的样子在后端:

enter image description here

我有这种类型的客户端:

enter image description here

我需要只显示时间变小时:分钟:秒。

如何将上述类型(即时间)转换为上面的格式?

+1

到底是什么问题?如果您只想显示时间,只需输出小时,分钟和秒。这些在数据对象中给出。 –

+1

什么是时间的测量?什么时候26分钟?你想显示一个时钟吗? – Kris

回答

1

var x = new Date(1561000); //replace with TotalMilliSeconds in your case 
 
var time = x.toUTCString().split(' ')[4]; //slit by space character 
 
console.log(time);

相关问题