0

How can I create with SSJS (e.g. under a computed field) a date object from a unix time stamp?

The date stamp is a string collected from a Notes view.

Patrick Kwinten
  • 1,988
  • 2
  • 14
  • 26

2 Answers2

0

Could you use this to convert the unix timestamp to a java date ?

java.util.Date time=new java.util.Date((long)timeStamp*1000);
0

You can use SimpleDateFormat to parse a string containing a timestamp with a certain pattern and then return a java.util.Date object.

Tommy Valand has created an easy to use library for that converting between date and string.

Per Henrik Lausten
  • 21,331
  • 3
  • 29
  • 76