How to use DIFFINDAYS function in calculated field in dataverse

Charlie Matanguihan 25 Reputation points
2024-10-27T03:45:02.8333333+00:00

I want to get the difference between today and another date time column in dataverse and put it into a column using calculated field but when I try to use DIFFINDAYS, it doesn't work. See below screenshot.

Thank you in advance for your help!

User's image

Dynamics 365 Training
Dynamics 365 Training
Dynamics 365: A Microsoft cloud-based business platform that provides customer relationship management and enterprise resource planning solutions.Training: Instruction to develop new skills.
157 questions
Microsoft Dataverse Training
Microsoft Dataverse Training
Microsoft Dataverse: A Microsoft service that enables secure storage and management of data used by business apps. Previously known as Common Data Service.Training: Instruction to develop new skills.
39 questions
{count} votes

Accepted answer
  1. Kiran P 5,050 Reputation points Microsoft Vendor
    2024-10-29T05:22:54.3833333+00:00

    Hi Charlie Matanguihan,

    Thank you for reaching out to us on Microsoft Q&A forum.  

    To implement the DIFFINDAYS function in a calculated field in Dataverse. Please follow the below steps.

    1. Access Your Dataverse Table:
      • Open the Dataverse environment and navigate to your specific table.
    2. Add a New Calculated Column:
      • Go to the "Columns" section.
      • Click on "Add Column" and select "Calculated" as the type.
    3. Write the Formula:
      • In the formula editor, enter
      • DIFFINDAYS(TODAY( ), [YourDataColumn])
      • Replace [YourDateColumn] with the actual name of your date column.
    4. Save and Validate:
      • Click "Save" and then validate to check for errors.
      By following the above steps, you should be able to successfully create a calculated field that utilizes the DIFFINDAYS function. If you are still facing any issue, please let us know in the comments. We are glad to help you. If the information is helpful, please Accept Answer so that it would be helpful to community members.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.