# MergeField.DateTimeFormat Property

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

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 20.0
- **Namespace:** `TXTextControl.DocumentServer.Fields`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.DocumentServer.Fields > MergeField.DateTimeFormat Property
- **418 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-fields/mergefield/datetimeformat-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-fields/mergefield/datetimeformat-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-fields/mergefield/datetimeformat-property/llms-full.txt

---

### Description

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

### Syntax

```csharp
public string DateTimeFormat { get; set; }
```

```vbnet
Public Property DateTimeFormat As String
```

### 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.

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

```vbnet
mergeField.DateTimeFormat = "0.00"
If Not String.IsNullOrWhiteSpace(mergeField.DateTimeFormat) Then
    Console.WriteLine($"Date Time Format: {mergeField.DateTimeFormat}")
End If
```

---

## Nearby

- **Previous:** [MergeField.DataSourceCulture Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-fields/mergefield/datasourceculture-property/llms-full.txt)
- **Next:** [MergeField.Mapped Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-fields/mergefield/mapped-property/llms-full.txt)
