TX Text Control .NET Server

DateTimeFormat Property

Property|Introduced in 20.0
Namespace
TXTextControl.DocumentServer.Fields
Package
TXTextControl.TextControl.Core.SDK as TXDocumentServer.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXDocumentServer.dll

Description

Specifies a string format which is applied to date / time values. Is equivalent to the MS Word field flag “\@”.

Syntax

public string DateTimeFormat { get; set; }

Examples

The following example uses MergeField.DateTimeFormat to configure date time format as part of the merge field workflow. The configured value is checked before the workflow continues.

mergeField.DateTimeFormat = "0.00";
if (!string.IsNullOrWhiteSpace(mergeField.DateTimeFormat))
{
    Console.WriteLine($"Date Time Format: {mergeField.DateTimeFormat}");
}