0

I've got a current staff list with a StartDate (datetime) column and two calculated columns: 'DaysWorkedAt', 'YearsWorkedAt'

I have an MS Flow workflow attached to the new employee list on new item created, it adds an entry to this list and performs the appropriate work adversaries calculation for the 2 columns mentioned above.

My formula for the calculated 'DaysAtCompany' is this:

=DATEDIF(StartDate,NOW(),"d")

Problem I have:

Adding a new entry via the interface to the current staff list the calculation works.

Adding it via the new employee list through MS Flow the calculated columns has a value of #Name?

I can't seem to work out what is causing this or how to fix it. I am using the internal names correctly. I can't find any special characters getting inserted.

Attached an image for reference.

enter image description here

  • The date field in first column is blank. whats that field? is it causing this issue? – Ganesh Sanap Nov 19 '18 at 6:26
  • @GaneshSanap Nah that just a string column for Birthday that typed in without the year. If you look at the other record they are all working. – TheLazyChap Nov 19 '18 at 7:10
1

I found the root cause. It is because the StartDate is greater than Now().

enter image description here

You can use the following formula instead:

For days:

=TEXT(NOW(),"mm/dd/yyyy")-StartDate

For years:

=TEXT(NOW(),"yyyy")-TEXT(StartDate,"yyyy")

enter image description here

  • I also found the same article about the DATE DIF, I've worked error logic into it now. Thanks though, I'll mark your answer as correct. – TheLazyChap Nov 20 '18 at 3:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.