from unix timestamp to datetime

前端 未结 8 1029
日久生厌
日久生厌 2020-12-01 09:28

I have something like /Date(1370001284000+0200)/ as timestamp. I guess it is a unix date, isn\'t it? How can I convert this to a date like this: 31.05.201

8条回答
  •  一生所求
    2020-12-01 10:07

    The /Date(ms + timezone)/ is a ASP.NET syntax for JSON dates. You might want to use a library like momentjs for parsing such dates. It would come in handy if you need to manipulate or print the dates any time later.

提交回复
热议问题