【发布时间】:2019-08-12 12:10:17
【问题描述】:
请查找附件。实际日期是 2019 年 3 月 6 日,但返回的甲酸盐始终是 1970 年 1 月 1 日。我该如何解决这个问题?
apiData.map(res => {
const startDate = moment(res.Issue_Date).format('DD/MMM/YYYY');
const endDate = moment(res. Expire_Date).format('DD/MMM/YYYY');});
注意:我从这样的 API 调用中获取日期(Issue_Date: 20190603)
【问题讨论】:
-
可以分享一下代码吗?
-
代码已更新。我从这样的 API 获取日期格式(Issue_Date: 20190603)
-
@sagar 我尝试了上述解决方案但不起作用。
-
请不要用答案更新问题。而是将其作为答案发布在单独的帖子中
标签: angular momentjs angular-moment