# OpcClient.DeleteNodesHistoryAtTime Method

> Reference: Deletes historical values at specific timestamps of the nodes as defined by the commands specified using a single history update service request.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcClient</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.client">Opc.UaFx.Client</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Members</dt>
<dd><a href="./members">OpcClient Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

<span class="api-meta">2 overloads</span>

| Overload | Description |
|---|---|
| [DeleteNodesHistoryAtTime(IEnumerable&lt;OpcDeleteNodeHistoryAtTime&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/deletenodeshistoryattime#deletenodeshistoryattime-system-collections-generic-ienumerable-of-opc-uafx-client-opcdeletenodehistoryattime) | Deletes historical values at specific timestamps of the nodes as defined by the `commands` specified using a single history update service request. |
| [DeleteNodesHistoryAtTime(params OpcDeleteNodeHistoryAtTime\[\])](#deletenodeshistoryattime-opc-uafx-client-opcdeletenodehistoryattime-array) | Deletes historical values at specific timestamps of the nodes as defined by the `commands` specified using a single history update service request. |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The client is not connected to the server or the service execution failed upon different circumstances; for more details see exception details. |
| [ObjectDisposedException](https://learn.microsoft.com/dotnet/api/system.objectdisposedexception) | The object has been disposed of. |

## DeleteNodesHistoryAtTime(IEnumerable&lt;OpcDeleteNodeHistoryAtTime&gt;)

Deletes historical values at specific timestamps of the nodes as defined by the `commands` specified using a single history update service request.

<div class="api-signature" data-lang="csharp">

```csharp
public IDictionary<OpcNodeId, OpcStatusCollection> DeleteNodesHistoryAtTime(
    IEnumerable<OpcDeleteNodeHistoryAtTime> commands)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function DeleteNodesHistoryAtTime(
    commands As IEnumerable(Of OpcDeleteNodeHistoryAtTime)) As IDictionary(Of OpcNodeId, OpcStatusCollection)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcDeleteNodeHistoryAtTime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcdeletenodehistoryattime/)&gt; | A sequence of [OpcDeleteNodeHistoryAtTime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcdeletenodehistoryattime/) commands, each defining the node and the timestamps of the values to delete from its history. |

**Returns**

[IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary-2)&lt;[OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/), [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/)&gt;

A dictionary which provides for each node an [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/) with the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) instances the server reports for the command.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `commands` sequence or one of its items is a null reference (Nothing in Visual Basic). |
| [LicenseException](https://learn.microsoft.com/dotnet/api/system.componentmodel.licenseexception) | The license is expired. |

**Remarks**

In case there several commands refer to the same node, the status results of these commands are combined in the collection of that node in the order of the commands. In case there the server reports no status per value for a command, the collection holds the status of the command for the node instead.

## DeleteNodesHistoryAtTime(params OpcDeleteNodeHistoryAtTime\[\])

Deletes historical values at specific timestamps of the nodes as defined by the `commands` specified using a single history update service request.

<div class="api-signature" data-lang="csharp">

```csharp
public IDictionary<OpcNodeId, OpcStatusCollection> DeleteNodesHistoryAtTime(
    params OpcDeleteNodeHistoryAtTime[] commands)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function DeleteNodesHistoryAtTime(
    ParamArray commands As OpcDeleteNodeHistoryAtTime()) As IDictionary(Of OpcNodeId, OpcStatusCollection)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | params [OpcDeleteNodeHistoryAtTime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcdeletenodehistoryattime/)[] | An array of [OpcDeleteNodeHistoryAtTime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcdeletenodehistoryattime/) commands, each defining the node and the timestamps of the values to delete from its history. |

**Returns**

[IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary-2)&lt;[OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/), [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/)&gt;

A dictionary which provides for each node an [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/) with the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) instances the server reports for the command.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `commands` array or one of its items is a null reference (Nothing in Visual Basic). |

**Remarks**

In case there several commands refer to the same node, the status results of these commands are combined in the collection of that node in the order of the commands. In case there the server reports no status per value for a command, the collection holds the status of the command for the node instead.
