使用Javascript将unix时间戳转换为日期时间格式

时间:2014-05-13 09:25:24

标签: javascript unix datetime web linechart

这是我第一次使用javascript编写Web应用程序。我目前正面临一个问题。我的应用程序,它应该在实时折线图中可视化(出现日期)和(出现频率)。问题是,我收到unix格式的时间戳数据。

我的问题。如何使用javascript将unix数据更改为数据时间格式?

这是json文件:

       [{"OccurrenceDate":"\/Date(1397602800000+0100)\/","OccurrenceFrequency":17},
       {"OccurrenceDate":"\/Date(1398207600000+0100)\/","OccurrenceFrequency":17},
       {"OccurrenceDate":"\/Date(1398639600000+0100)\/","OccurrenceFrequency":1},
       {"OccurrenceDate":"\/Date(1398726000000+0100)\/","OccurrenceFrequency":1},
       {"OccurrenceDate":"\/Date(1398898800000+0100)\/","OccurrenceFrequency":3},
       {"OccurrenceDate":"\/Date(1399071600000+0100)\/","OccurrenceFrequency":12}]

非常感谢你的帮助

0 个答案:

没有答案