# DateField.Format Property

> Gets and sets the format of the field. It must be a standard DateTime format string of the .NET Framework.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 15.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 > DateField.Format Property
- **396 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-fields/datefield/format-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-fields/datefield/format-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-fields/datefield/format-property/llms-full.txt

---

### Description

Gets and sets the format of the field. It must be a standard DateTime format string of the .NET Framework.

### Syntax

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

```vbnet
Public Property Format As String
```

### Examples

The following example uses `DateField.Format` to configure format as part of the date field workflow. The configured value is checked before the workflow continues.

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

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

---

## Nearby

- **Previous:** [DateField.Date Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-fields/datefield/date-property/llms-full.txt)
- **Next:** [DateField.Text Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-fields/datefield/text-property/llms-full.txt)
