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

787 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
  • 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.