getCalcDateTime

Gets a DateTime as a compareable number with a given accuracy.

Parameters

  1. dateTime value or controlId

  2. accuracy - "seconds" (default), "minutes" or "hours"

Example Usages

   brixxApi.getCalcDateTime(myDateTimeControl);
   brixxApi.getCalcDateTime(myDateTimeControl, "minutes");
   brixxApi.getCalcDateTime(myDateTimeControl, "hours");

Example 2 calculation

   let durationInSeconds = brixxApi.getCalcDateTime(myDateTimeEnd) - brixxApi.getCalcDateTime(myDateTimeStart);
   let durationInMinutes = brixxApi.getCalcDateTime(myDateTimeEnd, "minutes") - brixxApi.getCalcDateTime(myDateTimeStart, "minutes");
   let durationInHours = brixxApi.getCalcDateTime(myDateTimeEnd, "hours") - brixxApi.getCalcDateTime(myDateTimeStart, "hours");

Last updated