jsp - Convert session.lastAccessedTime into javascript date object -


i need convert session.lastaccessedtime object jsp javascript date object. currently, displays long object. how can convert javascript date object?

console.log('maxinactive interval ==  ' +  ${pagecontext.session.lastaccessedtime}); 

you can use date.parse() method convert date string date object.

mdn date.parse()

the date.parse() method parses string representation of date, , returns number of milliseconds since january 1, 1970, 00:00:00 utc

date.parse(lastaccessedtime)


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

node.js - Using Node without global install -

php - CakePHP HttpSockets send array of paramms -