> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Select DateTime

> Select DateTime

This element is used to input a [DateTime][1].

## Configuration

| Setting   | Description                          |
| :-------- | :----------------------------------- |
| mayBeNull | Whether the field is required (Bool) |
| empty     | Whether the field is required (Bool) |

## Functions

### setValue(String dateTime)

Sets the selected `DateTime`. The value must be formatted in a standard way, for example, YYYY-MM-DD HH:MI:SS.

### toString()

Returns the date as a string formatted as **YYYY-MM-DD HH:MI:SS**.

[1]: ../../../automation/crmscript/datatypes/datetime-type


## Related topics

- [DateTime](/en/automation/crmscript/reference/CRMScript.Global.DateTime.md)
- [Operators and data types](/en/api/search/find-selection/operators.md)
- [NSSelectionEntity](/en/automation/crmscript/reference/CRMScript.NetServer.NSSelectionEntity.md)
- [DateTime data type](/en/automation/crmscript/datatypes/datetime-type.md)
- [SubPersonContactDynamicSelectionSingleCriteriaGroup](/en/api/archive-providers/reference/subpersoncontactdynamicselectionsinglecriteriagroup.md)
- [NSSelectableMDOListItem](/en/automation/crmscript/reference/CRMScript.NetServer.NSSelectableMDOListItem.md)
