2017-08-09 211 views

回答

3

这是很简单的...

只要使用此:

moment('2017-08-14T18:30:00.000Z').format('ddd, MMM YY') 
+0

它不会改变他想要的格式 – ZAhmed

+0

你检查了吗?这将工作人@ZAhmed –

1

你可以试试这个:

new Date('2017-08-14T18:30:00.000Z').toDateString(); 
+0

取消定义函数错误 –

+0

@ sunielkalwani https://www.w3schools.com/jsref/jsref_todatestring.asp –

+0

它会说未定义的时刻(2017-08-14T18:30:00.000Z)toDateString() –

1

尝试:

format('ddd, DD MMM YY') 
+0

感谢它的工作 –

相关问题