AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 13.02.2018, 01:20   #1  
Blog bot is offline
Blog bot
Участник
 
20,568 / 712 (65) +++++++
Регистрация: 28.10.2006
powerobjects: How to Calculate Number of Days Between Two Date and Time Fields
Источник: https://www.powerobjects.com/2018/02...d-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.



 Calculated Field

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.



Calculation Logic

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.



In Action

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!



Источник: https://www.powerobjects.com/2018/02...d-time-fields/
__________________
Расскажите о новых и интересных блогах по 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
CRM DE LA CREME! Some more useful javascripts for MS CRM Blog bot Dynamics CRM: Blogs 0 04.05.2010 11:05
wiki.dynamicsbook: Changes Made in Navision Attain 3.60 Blog bot Dynamics CRM: Blogs 0 02.09.2008 13:23
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 12:27.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.