# CMxTime Class

Namespace: `ArchestrA.Toolkit`

CMxTime is derived from CMxCommon and provides support for Time/DateTime Attributes.

**Syntax**

```csharp
public class CMxTime : CMxCommon
```

## CMxTime Property

### Value Property

Provides a property to get and set the value as a DateTime.

**Syntax**

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

**Returns**

DateTime

## CMxTime Constructors

### CMxTime Constructor

Provides a default constructor.

**Syntax**

```csharp
public CMxTime();
```

### CMxTime Constructor DateTime

Provides a constructor to initialize the class with a DateTime default value.

**Syntax**

```csharp
public CMxTime (DateTime v);
```

**Parameters**

**`v`**

[in] DateTime instance value to be set.

### CMxTime Constructor string

Provides a constructor to initialize the class with a formatted time string default value.

**Syntax**

```csharp
public CMxTime(string v);
```

**Parameters**

**`v`**

[in] string value to be set.

### CMxTime Constructor SupportWrapper, string

Provides a constructor to initialize the class for use in a primitive wrapper.

**Syntax**

```csharp
public CMxTime (SupportWrapper _wrapper, string _attributeRef);
```

**Parameters**

**`_wrapper`**

[in] SupportWrapper.

**`_attributeRef`**

[in] string value that holds the attribute reference.

## CMxTime Method

### Set Method

Provides a method to set the value of the Attribute from a CMxTime.

**Syntax**

```csharp
public void Set(CMxTime val);
```

**Parameters**

**`val`**

[in] CMxTime value to be set.

## CMxTime Operator Overloads

### CMxTime Operator Overload DateTime

Provides an operator that converts from DateTime to CMxTime.

**Syntax**

```csharp
public static implicit operator CMxTime(DateTime x);
```

**Parameters**

**`x`**

[in] DateTime value to convert to CMxTime.

**Returns**

CMxTime

### CMxTime Operator Overload CMxValue

Provides an operator that converts from CMxValue to CMxTime.

**Syntax**

```csharp
public static implicit operator CMxTime (CMxValue val);
```

**Parameters**

**`val`**

[in] CMxValue value to convert to CMxTime.

**Returns**

CMxTime

### CMxValue Operator Overload CMxTime

Provides an operator that converts from CMxTime to CMxValue.

**Syntax**

```csharp
public static implicit operator CMxValue(CMxTime val);
```

**Parameters**

**`val`**

[in] CMxTime value to convert to CMxValue.

**Returns**

CMxValue

### DateTime Operator Overload CMxTime

Provides an operator that converts from CMxTime to DateTime.

**Syntax**

```csharp
public static implicit operator DateTime (CMxTime val);
```

**Parameters**

**`val`**

[in] CMxTime value to convert to DateTime.

**Returns**

DateTime

### - Operator Overload CMxTime, DateTime (TimeSpan)

Provides an operator to subtract a DateTime from a CMxTime.

**Syntax**

```csharp
public static TimeSpan operator -(CMxTime t1, DateTime t2);
```

**Parameters**

**`t1`**

[in] CMxTime value.

**`t2`**

[in] DateTime value.

**Returns**

TimeSpan

### - Operator Overload CMxTime, TimeSpan (DateTime)

Provides an operator to subtract a TimeSpan from a CMxTime.

**Syntax**

```csharp
public static DateTime operator -(CMxTime t1, TimeSpan t2);
```

**Parameters**

**`t1`**

[in] CMxTime value.

**`t2`**

[in] TimeSpan value.

**Returns**

DateTime

### != Operator Overload CMxTime, DateTime (bool)

Provides an operator to check if a CMxTime and DateTime are not equal.

**Syntax**

```csharp
public static bool operator !=(CMxTime t1, DateTime t2);
```

**Parameters**

**`t1`**

[in] CMxTime value.

**`t2`**

[in] DateTime value.

**Returns**

bool

### + Operator Overload CMxTime, TimeSpan (DateTime)

Provides an operator to add a TimeSpan to a CMxTime.

**Syntax**

```csharp
public static DateTime operator +(CMxTime t, TimeSpan ts);
```

**Parameters**

**`t`**

[in] CMxTime value.

**`ts`**

[in] TimeSpan value.

**Returns**

DateTime

### < Operator Overload CMxTime, DateTime (bool)

Provides an operator to check if a CMxTime is less than a DateTime.

**Syntax**

```csharp
public static bool operator <(CMxTime t1, DateTime t2);
```

**Parameters**

**`t1`**

[in] CMxTime value.

**`t2`**

[in] DateTime value.

**Returns**

bool

### <= Operator Overload CMxTime, DateTime (bool)

Provides an operator to check if a CMxTime is less than or equal to a DateTime.

**Syntax**

```csharp
public static bool operator <=(CMxTime t1, DateTime t2);
```

**Parameters**

**`t1`**

[in] CMxTime value.

**`t2`**

[in] DateTime value.

**Returns**

bool

### == Operator Overload CMxTime, DateTime (bool)

Provides an operator to check if a CMxTime is equal to a DateTime.

**Syntax**

```csharp
public static bool operator ==(CMxTime t1, DateTime t2);
```

**Parameters**

**`t1`**

[in] CMxTime value.

**`t2`**

[in] DateTime value.

**Returns**

bool

### > Operator Overload CMxTime, DateTime (bool)

Provides an operator to check if a CMxTime is greater than a DateTime.

**Syntax**

```csharp
public static bool operator >(CMxTime t1, DateTime t2);
```

**Parameters**

**`t1`**

[in] CMxTime value.

**`t2`**

[in] DateTime value.

**Returns**

bool

### >= Operator Overload CMxTime, DateTime (bool)

Provides an operator to check if a CMxTime is greater than or equal to a DateTime.

**Syntax**

```csharp
public static bool operator >=(CMxTime t1, DateTime t2);
```

**Parameters**

**`t1`**

[in] CMxTime value.

**`t2`**

[in] DateTime value.

**Returns**

bool
