getCalcDate
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.
Parameters
Example Usages
let calcDate1 = app.getCalcDate(app.getFieldValue("myDateTime1"));
let calcDate2 = app.getCalcDate(app.getFieldValue("myDate2"));
if (calcDate1 === calcDate2) {
//Do something
}Example Results
app.getCalcDate(new Date("1995-12-17 03:24:00")); //9481 (days since 1.1.1970)
app.getCalcDate("1995-12-17 03:24:00"); //9481
app.getCalcDate("1995-12-17 12:44:30"); //9481
app.getCalcDate(myControlId); //?Return Values
Last updated