Calculating DateTime - Date in Searches and Script

Good day.

Need to get the time elapsed between a DATETIME field and a DATE field.

I am working with PROJECTS and it has the field STARTDATE as DATE; I have a custom entity field named DATE_TO_CLOSEDCANCELLED as DATETIME.

My need is to DATE_TO_CLOSEDCANCELLED - STARTDATE to get the total elapsed time since creation until closure.

Need it in script and also in saved search; in the search I have tried without success TO_NUMBER(TO_CHAR(DATE_TO_CLOSEDCANCELLED)) - TO_NUMBER(TO_CHAR(STARTDATE)) with FORMATTING MM/DD/YYYY and without formatting.

Plan is to get it done in the search to after get it done in script.

Your help will be highly appreciated.

Posted Jan 11, 2024, 2:18 PM UTC

12
Loading comments…