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
.
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
Post a Comment