brixxbox Wiki
Ask or search…


Converts a date to the total days since 1.1.1970 to make it easy comparable. You can use Date, or DateTime as input and even if two datetime values do have different times.


inputDate - This can be a date or datetime in any format or a controlId to a date or dateTime control

Example Usages

let calcDate1 = brixxApi.getCalcDate(brixxApi.getFieldValue("myDateTime1"));
let calcDate2 = brixxApi.getCalcDate(brixxApi.getFieldValue("myDate2"));
if(calcDate1 === calcDate2){
//Do something

Example Results

brixxApi.getCalcDate(new Date('1995-12-17 03:24:00')) //9481 (days since 1.1.1970)
brixxApi.getCalcDate('1995-12-17 03:24:00') //9481
brixxApi.getCalcDate('1995-12-17 12:44:30') //9481
brixxApi.getCalcDate(myControlId) //?