powerobjects: How to Calculate Number of Days Between Two Date and Time Fields
In today’s blog, we are going to demonstrate how to calculate the difference in the number of days between two date and time fields. This functionality also works for the Date & Time and Date Only field as well as the Date Only and Date Only fields. Which means that you can use any possible combination of custom or out-of-the-box Date fields.
In the scenario below, we will estimate the number of days it took the Sales Rep to qualify a Lead to an Account.
Lead Creation Date
First, we will create a Lead Created On field that will hold the information we already possess on the Lead record. In the scenario below, we are using the Date & Time field, as the Created On field on the Lead record is the same format.
The next thing we have to do is to create a Calculated field type Decimal Number. The reason we have selected Decimal Number is because we are using two Date & Time fields as Dynamics 365 includes the Created on Time as part of the calculation. However, we are interested only on the number of days so we will set the Precision value to zero (0). You also can use a Whole Number field type based on your project requirements.
Once you have saved the field, click on edit and set up the logic. In this scenario, we will use the DiffinDays function and specify the start and end date and time. Although, when using the DiffinDays function within the brackets it specifies Date & Time field, the functionality equally works if you select Date Only field type.
After saving and publishing the changes, we can go back to the form and test the new function.
There you have it! For more tips and tricks for using Microsoft Dynamics 365, keep checking our blog!
Happy Dynamics 365’ing!
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
|stoneridgesoftware: How to Use Time Intelligence in Power BI Using DAX||Blog bot||DAX Blogs||0||21.12.2017 08:14|
|axmfg: More about (dynamic) negative days||Blog bot||DAX Blogs||0||19.02.2015 23:16|
|atinkerersnotebook: Walkthrough & Tutorial Summary||Blog bot||DAX Blogs||1||09.09.2013 09:11|
|wiki.dynamicsbook: Changes Made in Navision Attain 3.60||Blog bot||Dynamics CRM: Blogs||0||02.09.2008 13:23|
|Опции темы||Поиск в этой теме|