mscrm-addons.com logomscrm-addons.com logo
  • Release History
  • Knowledge Base
  • Documentation
  • Contact Support
  • Release History
  • Knowledge Base
  • Documentation
  • Contact Support
home/Knowledge Base/Template Designer(DCP)/DateTime Field (Dynamics 365)

DateTime Field (Dynamics 365)

4317 views 0 Updated on January 30, 2025

DateTime fields (Dynamics 365) allow you to perform basic calculations with dates. You can add a certain amount of time to a current date or calculate the difference between two. The following step-by-step description will show you how to insert a field of this type into your template and give a general overview of its features. 

Please note: If you want to insert just the current date, please use the Advanced String field instead. 

Step-by-Step Walkthrough: Insert dates and date operations in document templates for Dynamics 365

Step-by-step description 

Step 1: Open the ❶ Insert Field menu and navigate to the ❷ Computed Items section. Within this section, select the ❸ DateTime Field button. 
Selecting the DateTime Field option
Figure 1: Selecting the DateTime Field option

Step 2: The DateTime Field properties will open. This dialog box allows you to specify your DateTime Field based on the options provided.  

The DateTime Field properties window
Figure 2: The DateTime Field properties window
Step 3: Add fields to the pattern via the ❶ Property Designer or via the ❷ Text property designer. You can add a field either by ❸ double-clicking on the tree view or by ❸ searching for it.  In the Property Designer, fields can be dragged and dropped where appropriate.  When adding a field via the Property Designer, right-clicking on the field will display the ❹ functions you can use with it. These ❺ functions are:  
  • Add (value,unit) 
  • Subtract (value, unit) (Note: choosing this function will alter the formatting options – see Step 5) 
  • Add Business Days (value) 
  • Round (unit, direction) 
Enter the value you need. In our case, we will enter 5 to our ❻ add function and set ❼ days to our unit instead of years.  

Note:

If the formula doesn’t display correctly, enlarge the window to ensure the entire input is visible.

The various options and functions of the DateTime Field properties window
Figure 3: The various options and functions of the DateTime Field properties window
Alternatively, you can manually enter fields and functions in the ❶ Text property designer.  

Note: The syntax for Text property designer is here.  

The 'classic' Text property designer
Figure 4: The ‘classic’ Text property designer
Step 4: ❶ Placeholder Text can be set to allow your field to be more easily found in the event the template must be modified in the future. 
Configuring the placeholder text
Figure 5: Configuring the placeholder text

Step 5: The system shows Formatting options at the bottom of the window. When applied, the resulting date formats based on the values defined in the Format and Culture dropdowns.

Note:

Learn more about custom date and time formatting strings here. For culture formatting strings, see this link. 

The formatting options will change depending on if ❶ standard formatting is being applied, or if the entered dates are being ❷ subtracted. If the difference between dates is being found, then the formatting options change to what is shown below on the right. 
DateTime Fields (Dynamics 365)
Figure 6: The formatting options

Step 6: Insert the field by clicking OK. This will add the field to the document. 

DateTime Fields (Dynamics 365)
Figure 7: Our configured DateTime field

Step 7: Save and test your template. You can save the template locally using the standard Save or Save As functionality of Word, or through the Save template option in DocumentsCorePack to publish it to Dynamics 365. Test the template by following the steps found here. 

The results of our merged field are below.

DateTime Fields (Dynamics 365)
Figure 8: The result of our DateTime field

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com. 

Was this helpful?

Yes  1 No
Related Articles
  • Debugging the Template Design Office Add-In 
  • Introducing the DocumentsCorePack Template Designer Office Add-In
  • Ensuring correct time zone display for DateTime fields
  • How to compare a date-fields with the current date 
  • Create a template for XML or plain text
  • E-Invoicing with DocumentsCorePack
Latest Articles
  • Recap: Nordic Summit 2025
  • The new Template Designer Office Add-In
  • Debugging the Template Design Office Add-In 
  • Updating Legacy SharePoint Connections 
  • What Happens After You Deploy AttachmentExtractor: Storage & Cost Savings in Dynamics 365
Popular Articles
  • DocumentsCorePack Template Designer – Getting Started
  • Step-by-Step: How to configure a One-Click-Action
  • Application Access for Dynamics 365
  • How to find your environment’s unique name in Microsoft Dynamics 365
  • How licenses are counted
Top Rated Articles
  • “Undefined”-labels in Chrome and Edge 114 and higher
  • Important information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack Connector for PowerApps & Microsoft Flow
  • How to insert Condition Fields in DocumentsCorePack Templates designer
  • How licenses are counted
Categories
  • *News and General Infos* 65
  • Webinars 46
  • Template Designer(DCP 197
  • DocumentsCorePack(DCP 260
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 75
  • PowerSearch (PS 50
  • ActivityTools (AT 61
  • SmartBar (SB 54
  • GroupCalendar (GC 47
Our Vision

“We see it as our purpose to provide products that simplify and speed up our customers’ Microsoft Dynamics 365 experience.”

Knowledgebase
LogIn
mscrm-addons.com
  • Products
  • Online Shop
  • Downloads
  • My Account
About Us
  • About Us
  • Case Studies
  • Newsletter
  • Partner Program
  • Contact
Support
  • Support
  • Terms & Conditions
  • Documentation
  • Webinars
  • Legal Documents
  • Impressum
  • © 2025 www.mscrm-addons.com. All Rights Reserved.