---
id: "P:cAlgo.API.DateTimePicker.Value"
kind: "property"
type: "T:cAlgo.API.DateTimePicker"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/Value/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# DateTimePicker.Value

Member of [DateTimePicker](https://help.ctrader.com/ctrader-algo/references/Controls/DateTimePicker/index.md).

## Value

Gets or sets value.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public DateTime Value {get; set;}
```

Python:

```python
dateTimePicker.Value: DateTime
```

### Returns

`DateTime` — 

Available since cAlgo.API 5.5.

### Examples

C#:

```csharp
var dateTimePicker = new DateTimePicker { Value = Server.Time.AddHours(1) };
Chart.AddControl(dateTimePicker);
Print("Selected time: {0}", dateTimePicker.Value);
```

Python:

```python
dateTimePicker = DateTimePicker()
dateTimePicker.Value = api.Server.Time.AddHours(1)
api.Chart.AddControl(dateTimePicker)
api.Print(f"Selected time: {dateTimePicker.Value}")
```

