locked
formula calculation error RRS feed

  • Question

  • Hi,

    I am trying to calculate duration of an employee with an organisation using the column below but i am receiving a syntax error.

    =TEXT(IF(ISBLANK([Employment Start Date]),"Employee startdate is blank",DATEDIF([Employment Start Date],Created,"Y"))&" years,"
     &(IF(ISBLANK([Employment Start Date]),"Employee startdate is blank",DATEDIF([Employment Start Date],Created,"ym"))&" months"))

    Thanks.


    nish

    Friday, May 24, 2013 2:58 PM

Answers

  • I assume your hiredate will be equal or greater than created date. And your calculated column is of type single line of text.

    Try the syntax below

    = IF(ISBLANK([HireDate]),"Date not entered",  DATEDIF([Created],[HireDate],"y") & " years " & DATEDIF([Created],[HireDate],"ym") & " months " & DATEDIF([Created],[HireDate],"md") & " days")


    Thanks


    Saturday, May 25, 2013 9:45 AM