1
votes

How to calculate the Average of Time from a NotesDateTime array in Lotus Script. I have an array of NotesDatetime values where I want to have an average of the time from the NotesDatetime value. Is there any easy way of doing it. Any code snippet will be very helpful.

1

1 Answers

1
votes
  1. Calculate the time difference (seconds) with TimeDifference from a certain date time value (e.g. Now) to every element of your NotesDateTime array.
  2. Calculate the average of all time differences.
  3. Calculate the average date time value with AdjustSecond adjusting the certain date time value (e.g. Now) to the average of all time differences.