javascript - Ext.js - Format TimeStamp into yyyy-mm-dd hh:mm:ss[.fffffffff] -


i have timestamp value:

var timestamp = 1469088703280; 

i have tried convert timestamp format yyyy-mm-dd hh:mm:ss[.fffffffff].

var timestampdate = new date(timestamp * 1000); ext.date.format(timestampdate ,'yyyy-mm-dd hh:mm:ss') 

however, method produces value:

52525252-temtem-2727 1414:0707:4444

any ideas on how achieve required format?

i see have asked decimal fraction of seconds can use below snippet.

var timestamp = new date(new date()); ext.date.format(timestamp ,'y-m-d h:i:s.u');  "2016-07-28 14:03:26.711" 

refer ext js docs more closely can configuration wish , wont have elsewhere.

http://docs.sencha.com/extjs/6.0.2-classic/ext.date.html


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -