• Documentation
  • Back to www.mscrm-addons.com
  • Documentation
  • Back to www.mscrm-addons.com
home/Knowledge Base/Template Designer(DCP)/DocumentsCorePack DateTime Field Syntax (Dynamics 365)

DocumentsCorePack DateTime Field Syntax (Dynamics 365)

1063 views 1 Updated on June 15, 2020

The  DateTime Field  option of DocumentsCorePack allows you to perform basic calculations on dates and times. This article describes the syntax that can be used for those calculations. 

  • The basic syntax: Fields from Dynamics are enclosed by “<<” and “>>” when you insert them from the tree view. 


Figure 1: Fields

  • The difference between two dates can be subtracted by using a “-” 


Figure 2: Difference between two dates

  • Functions on a date can be executed by adding a dot “.” and the function name including the necessary parameters. 


Figure 3: Function call with parameters

  • Supported functions and operators:
Operator  Name                
 Sign                                                                                                                                                                          Example 
Difference  – <<duedate>> – DATETIME() 

e.g. An offer with a due date minus today´s data to calculate.  

Operator table 

 

Function Description Examples 
Add(value, unit) Adds a numeric value to the current date.
The first parameter represents the numeric value that should be added.
The second parameter represents the unit.
Parameters for units are either: year, month, weeks, days, hours, minutes, seconds, milliseconds 
<<createdon>>.Add(10,year) 
 Subtract(value, unit) Subtracts a numeric value form the current date.
The first parameter represents the numeric value that should be subtracted.
The second parameter represents the unit.
Parameters for units are either: year, month, weeks, days, hours, minutes, seconds, milliseconds 
 <<createdon>>.Subtract(10,year) 
Addbusinessdays(value) Adds a certain amount of days to the current date.
Weekends (Saturday and Sunday) are excluded from this calculation. 
<<createdon> >.Addbusinessdays(10) 
Round(unit, direction) Round allows you to modify a time value to the next or previous quarter, half or full hour.
The first parameter can display a quarter, half or full hour.
The second parameter represents the direction. (up/down) 
<<createdon>>.Round(quarter,up)
<<createdon>>.Round(half,down)
<<createdon>>.Round(full) 
DATETIME() This call returns the current date and can be used as field followed with any of the above methode calls. DATETIME().Add(5,days) 

Function table 

 

PLEASE NOTE: You cannot join several functions calls. If you would like to add days and months, please always use the lowest unit for your call. 
e.g. 1 Month and 15 Days would be 45 Days

 

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

Was this helpful?

1 Yes  No
Related Articles
  • How to solve the issue with DocumentsCorePack fields in Arabic text
  • How to access mscrm-addons product settings in Dynamics 365
  • How to create totals in the footer of a table
  • How to set a specific Language in your Template
  • Azure Active Directory Licensing counts explained
  • When to use the „Do not use DataProvider“-setting in DocumentsCorePack
Latest Articles
  • Control access to DocumentsCorePack One-Click-Actions via Dynamics 365 security roles
  • How to display various activity-attributes within multiple rows in Gantt view
  • Recap: European Power Platform Conference 2022
  • How to solve the issue with DocumentsCorePack fields in Arabic text
  • How to access mscrm-addons product settings in Dynamics 365
Popular Articles
  • DocumentsCorePack Online Service Configuration
  • Where do I find the Unique Organization name in Microsoft Dynamics 365?
  • mscrm-addons.com Application Access for Dynamics 365 (App Access) – DocumentsCorePack
  • How to activate the DocumentsCorePack connector for PowerApps & Microsoft Flow
  • How licenses are counted
Top Rated Articles
  • IMPORTANT information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack connector for PowerApps & Microsoft Flow
  • Step-by-Step: How to configure a One-Click-Action
  • Can you save data capacity by moving email content?
  • DocumentsCorePack Property Syntax (Dynamics 365)
Categories
  • *News and General Infos* 50
  • Template Designer(DCP 160
  • DocumentsCorePack(DCP 181
  • TelephoneIntegration (TI 64
  • AttachmentExtractor (AE 55
  • PowerSearch (PS 43
  • ActivityTools (AT 57
  • SmartBar (SB 51
  • GroupCalendar (GC 45
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
  • © 2022 www.mscrm-addons.com. All Rights Reserved.