Date Difference

Comments

7 comments

  • Venu Reddy

    Hi Peter,

    Since you mentioned that date2 could be blank, shouldn't the formula check against date2 instead?

    Try with:

    IF(NOT(ISBLANK(#date2)); subtract(ASDATE(#date2);ASDATE(#date1))/1d);null)

    Also, once you convert strings to dates, you can do subtraction using the minus operator:

    IF(NOT(ISBLANK(#date2));((ASDATE(#date2)-ASDATE(#date1))/1d);null)

    0
    Comment actions Permalink
  • Peter Han-Grassman

    Venu, Sorry, date1 can be blank.  Date2 will always be populated.  Any thoughts with that use case?

    0
    Comment actions Permalink
  • Joel Stewart

    Is #date1 an empty string or is it null? 

    0
    Comment actions Permalink
  • Peter Han-Grassman

    It's an empty string

    0
    Comment actions Permalink
  • Joel Stewart

    I was able to successfully use your original formula and execute then re-open the workbook successfully. I'm using Datameer 5.11.14, what version did you test with? 

    There may be some additional context to the error message in the conductor.log file: https://datameer.zendesk.com/hc/en-us/articles/204557494

    Does the Workbook execution complete successfully or does it complete with warnings? 

    0
    Comment actions Permalink
  • Peter Han-Grassman

    v. 4.5.22

    Completes with warnings

     

    0
    Comment actions Permalink
  • Joel Stewart

    Since it completes with warnings, there is likely some details in the Job Trace that may point to the cause in more detail (i.e. with a stack trace).

    I'd recommend collecting and reviewing the Job Trace: https://datameer.zendesk.com/hc/en-us/articles/204802160

    If you'd like assistance with reviewing the Job Trace, I'd recommend creating a ticket with our dedicated Support team and attaching the Job Trace to troubleshoot this specific occurrence. 

    0
    Comment actions Permalink

Please sign in to leave a comment.