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)/How to format dates within a document name

How to format dates within a document name

1157 views 0

DocumentsCorePack relies on string formatting to create document names. When the OVALUE option is applied to a field (e.g., <<field_ovalue>>), it returns the value of the field in the internal database format. For date fields, this would be formatted as follows:

yyyy-MM-ddThh:mm:ss+TIMEZONE
2018-09-27T16:16:28+02:00 

With the .pos option (See DocumentsCorePack Property Syntax), you can get a specific section of this string that should be displayed.

<<field>>.pos(StartingPosition, Number of Characters)

Based on this information, using this .pos option allows you to get the day, month, and year as separate strings into your document name. Learn more about how to define document names in DocumentsCorePack.

Example:

The Setting of the Example Document Name:

<<createdon_ovalue>>.pos(1,4) + ‘-‘ + <<createdon_ovalue>>.pos(6,2) + ‘-‘ + <<createdon_ovalue>>.pos(9,2)

And the result of the Example Document Name:

2018-09-27.pdf

.pos(1,4) is the year
.pos(6,2) is the month
.pos(9,2) is the day

Document name example for .pos option
Figure 1: Document name example for .pos option

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

Was this helpful?

Yes  2 No
Related Articles
  • Hiding Table Rows in Word Templates
  • Creating a Conditional Row in a Table 
  • Why do companies struggle to automate document processes in Dynamics 365?
  • Debugging the Template Designer Office Add-In 
  • Introducing the DocumentsCorePack Template Designer Office Add-In
  • Ensuring correct time zone display for DateTime fields
Latest Articles
  • Can You Customize Business Central Document Layouts Without RDLC or Developer Support? 
  • Introducing DocumentsCorePack for Business Central
  • Hiding Table Rows in Word Templates
  • Creating a Conditional Row in a Table 
  • Recap: Scottish Summit 2026
Popular Articles
  • DocumentsCorePack Template Designer – Getting Started
  • Step-by-Step: How to configure a One-Click-Action
  • Application Access for Dynamics 365
  • How licenses are counted
  • How to find your environment’s unique name in Microsoft Dynamics 365
Top Rated Articles
  • “Undefined”-labels in Chrome and Edge 114 and higher
  • How to insert Condition Fields in DocumentsCorePack Templates designer
  • 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
Categories
  • DCP for BC 2
  • *News and General Infos* 85
  • Webinars 50
  • Template Designer(DCP 200
  • DocumentsCorePack(DCP 278
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 81
  • 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
  • Cookies
  • © 2025 www.mscrm-addons.com. All Rights Reserved.