- Powered by Domino 8.5.2 Domino Accelerator Pack
- Just serve your web pages faster
Lotus Triple Search DominoExperts + Blogs + R8 forum -> Script vault -> Java

 Converting NotesDateTime -> Java CurrentTimeMillis?

Tomas NielsenPost date: 2007-11-24 10:14

Is there a clever way to convert NotesDateTime to the Java equivalent?

I would like to compare creation dates without having to use the Notes classes.

But I guess I will have to build my own.

Tomas NielsenPost date: 2007-11-27 14:08

Ok, found some helpful hints in the Help.

   System.out.println("System.currentMillis(): " + System.currentTimeMillis() );
   System.out.println("session.createDateTime(): " + session.createDateTime("Today").toJavaDate().getTime() );

These code lines will produce the same result - it usually differs 10 milliseconds.
The reason you would like to work with Java Dates is because it takes 16 bytes per entry where the DateTime of Domino takes 96 bytes per entry.

Creating 100 000 Date entries takes 141 ms and creating 100 000 DateTime entries takes 9114 ms. So for large operations it might be worthwile to consider.

But we are very close to sub optimizing now. 


RSS feed
Subscribe to Forum

Share this page

Top posters
Tomas Nielsen212
Joacim Boive27
Fredrik Stöckel27
Niklas Waller13
Kenneth Haggman11
Bryan Kuhn10
Daniel Lehtihet9
Jonas Israelsson8